Case Study … and a new tuning record!
We do a lot of performance tuning of slow SQL Server code.
In this example, I will show you how we set our personal best record!
75,336 % improvement in stored procedure performance!
Improvements achieved:
- CPU from 18,922 to 1,249
- Reads from 12,850,589 to 18,532
- Duration from 30,682 to 685
It is 753x faster!
What was changed?
A SELECT with four JOINS became two SELECTs using a UNION.
That’s it. That simple!
Got any proof?
Obviously, we can just paste client code here. But here is what I can show you.
Below you will see a capture of BEFORE vs. AFTER performance tuning run. SQL proc performance BEFORE it was tuned and AFTER it was tuned.
Agree? Disagree? Comment below.
See more SQL Server Performance Optimization examples here.