Index tuningFirearms maker, anonymized × red9CS-0443
A top production query tuned to hand back about 90 minutes of SQL time a day
The problem. A firearms maker with a busy production SQL Server had one query near the top of its load, run between 400 and 500 times a day. Each run dragged, and stacked across the day it burned roughly 90 minutes of SQL and staff wait time. People sat waiting on a result that should have come back at once.
What we did. We pulled the plan and the runtime statistics, then built a covering index matched to the query's filter and output columns, so the engine seeks a few rows instead of scanning the table end to end. Rollback scripts were shipped with it.
Red9 · Performance Impact
SQL capacity reclaimed
~90 min / day
Across 400 to 500 daily runs of the top query, on the same hardware.
Query, faster
1,552x
A 155,223% improvement on the tuned query.
Access pattern
scan → seek
A covering index replaced a full scan of the production table.
Query speed
155,223% improvement
1,552x faster
Daily runs
400 to 500 / day
unchanged
Time reclaimed
~90 min / day
daily
1,552x less
now near-instant
How the numbers add up. The 1,552x is the query's old runtime over its tuned runtime, the same as the client's reported 155,223% improvement. The ~90 minutes a day is that per-run saving multiplied across the 400 to 500 executions the query gets daily. Both come straight from the manufacturer's own before-and-after captures.
The result. The query now seeks instead of scanning and returns almost immediately, 1,552 times quicker than before. Across 400 to 500 runs a day, that gives the manufacturer back close to 90 minutes of SQL and people-wait time.
The technical detail
What the review surfaced. The top query filtered a large production table with nothing to support it, so every one of its 400-to-500 daily calls scanned the whole table.
What we changed (identifiers generalized for privacy):
-- Top production query scanned a large table on every call, 400-500x/day.
CREATE NONCLUSTERED INDEX IX_prod_hot_query_covering
ON dbo.[production_orders] (/* filter cols */) INCLUDE (/* output cols */);
-- rollback: DROP INDEX script provided
The covering index flipped the scan into a seek, taking the query 1,552x faster and clearing roughly 90 minutes of daily SQL work off the box.