Commit 50d10f5
Remove pointless WAITFOR DECOMPRESS filters from stats/store queries
The CAST(DECOMPRESS(...)) NOT LIKE N'WAITFOR%' filter was decompressing
query text on every row in query_stats and query_store_data just to skip
WAITFOR queries. WAITFOR has no plan and no meaningful stats — it only
matters in query snapshots (active sessions), where the filter remains.
On a 742K-row query_stats table, this was a significant contributor to
the 120-second query timeouts reported in #835.
The snapshot filters (report.query_snapshots) and MCP phased queries
are untouched — they filter after TOP on already-hydrated text.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent a88572c commit 50d10f5
1 file changed
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1104 | 1104 | | |
1105 | 1105 | | |
1106 | 1106 | | |
1107 | | - | |
1108 | 1107 | | |
1109 | 1108 | | |
1110 | 1109 | | |
| |||
1477 | 1476 | | |
1478 | 1477 | | |
1479 | 1478 | | |
1480 | | - | |
| 1479 | + | |
1481 | 1480 | | |
1482 | 1481 | | |
1483 | 1482 | | |
| |||
1580 | 1579 | | |
1581 | 1580 | | |
1582 | 1581 | | |
1583 | | - | |
1584 | 1582 | | |
1585 | 1583 | | |
1586 | 1584 | | |
| |||
0 commit comments