SQL Server Performance Tuning

How One Index Cut 60 Minutes of Daily SQL Server Wait Time

Updated October 3, 20252 min read

Time given back

~365 hof waiting removed a year

It runs about 11,500 times a day, and those calls added up to about 60 minutes of waiting every day. Now it is near zero.

Waiting on CPU and memory, minutes per day

Before60 min
After~0 min

Source: the client’s monitoring, two weeks around the change. Yearly figure: about 60 minutes a day × 365 days.

A query that runs all day does not need to be slow to be expensive.

Its cost is the wait per run multiplied by the number of runs.

The problem

One stored procedure spent roughly 60 minutes every day waiting on CPU and memory. It stood out in a routine review for a client whose databases we tune on a regular schedule.

It ran about 11,500 times a day. And each run read around 15,000 pages and waited about 320 ms.

The fix

This is what we did to fix the issue: we added one non-clustered index.

A single index can change performance in many places at once: other queries, other stored procedures, SQL Server Agent jobs and SSIS (Integration Services) packages that touch the same table.

Final thoughts

Small queries that run all day are where the time goes. A 320 ms wait looks harmless until you multiply it by 11,500.

When your server reads less, it has more capacity. And that can push a hardware upgrade further into the future.

Watch the queries that run most often. A small gain on each run adds up fast.

Under the hood

Before and after, every measurement

Reads per run dropped about 6 times, and the daily wait time went to near zero.

BeforeAfter
Logical reads per executionabout 15,000about 2,500
Wait time per executionabout 320 msnear zero
CPU and memory waits per dayabout 60 minutesnear zero
Executions per dayabout 11,500about 11,500
Values are approximate. They are read from the monitoring tool's daily charts for the two weeks around the change.

The workload stayed the same, reads fell about 6 times, and an hour of daily waiting went away.

Check Red9's SQL Server Services

SQL Server Consulting

Perfect for one-time projects like SQL migrations or upgrades, and short-term fixes such as performance issues or SQL remediation.

Discover More ➜

SQL Server Managed Services

Continuous SQL support, proactive monitoring, and expert DBA help with one predictable monthly fee.

Discover More ➜

Emergency SQL Support

Take the stress out of emergencies with immediate access to a SQL Server Sr. DBA 24x7x365

Discover More ➜

Explore All Services ➜