Problem: Slow stored procedure
75,336% improvement in stored procedure performance!
Notes:
Improvements achieved:
• CPU from 18,922 to 1,249
• Reads from 12,850,589 to 18,532
• Duration from 30,682 to 685
What was changed?
A SELECT with four JOINS became two SELECTs using a UNION.
It’s not 1 thousand times faster. But it is close!
That’s it. That simple!