Skip to content

Commit 160921f

Browse files
Refactor query/procedure/query store stats to phased DECOMPRESS approach
All three grid queries now use a 3-phase pattern: 1. Aggregate numerics into temp table (no DECOMPRESS) 2. Sum across lifetimes, rank TOP 500 3. OUTER APPLY to decompress text/plan for only the 500 winners On a 742K-row query_stats table, this reduces DECOMPRESS calls from 742K to 500 — eliminating the 16+ minute query times reported in #835. Matches the existing phased pattern used by the MCP query tools. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 50d10f5 commit 160921f

1 file changed

Lines changed: 309 additions & 148 deletions

File tree

0 commit comments

Comments
 (0)