Finance operations
~883 MBless data read on every run
This bills-and-refunds procedure runs often, and every run waited 2.5 seconds (2,462 ms). One index brought that under a second (918 ms).
Data read per run
Source: average of multiple runs. Data = 118,566 → 10,785 pages × 8 KB.
Reading from disk is the slowest operation SQL Server does.
Therefore, tuning for less disk “reads” is often the primary goal.
The problem
The frequently executed stored procedure select_arBillsRefunds is performing slower than expected.
The fix
To fix the issue we added an additional index IX to tblDlvitem.
Final thoughts
Adding indexes can really speed up your SQL Server queries, but there's a catch - they might also slow things down if not used wisely.
Under the hood
Before and after, every measurement
The improvement was huge: the total number of disk reads was 10,785 instead of 118,566!
Below is the detailed breakdown by metric:
| Before | After | Improvement | |
|---|---|---|---|
| Duration (ms)* | 2,462 | 918 | ~3x |
| CPU (ms)* | 2,469 | 922 | ~3x |
| Disk (number of reads)* | 118,566 | 10,785 | ~11x |
After our tuning, the stored procedure became significantly faster, with average duration dropping from 2,462 ms to 918 ms.
That’s almost 3x faster.
In today's case, an additional index helped us slash the overall duration of the stored procedure by nearly 3x - an outstanding outcome!
But it’s very important to understand your overall workload and find a good balance between making your queries efficient and not paying too much for that.


