Commit 3db895c
Cap query/procedure/query store grid results to TOP 500
GetQueryStatsAsync, GetProcedureStatsAsync, and GetQueryStoreDataAsync
were returning unbounded result sets. With 49 databases and 742K rows
in query_stats over 3 days, the GROUP BY with plan XML could produce
thousands of rows and timeout after 120 seconds.
TOP 500 ordered by avg CPU desc is plenty for a grid view and prevents
the query from consuming unbounded memory on large installations.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 523a91c commit 3db895c
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1110 | 1110 | | |
1111 | 1111 | | |
1112 | 1112 | | |
1113 | | - | |
| 1113 | + | |
1114 | 1114 | | |
1115 | 1115 | | |
1116 | 1116 | | |
| |||
1345 | 1345 | | |
1346 | 1346 | | |
1347 | 1347 | | |
1348 | | - | |
| 1348 | + | |
1349 | 1349 | | |
1350 | 1350 | | |
1351 | 1351 | | |
| |||
1520 | 1520 | | |
1521 | 1521 | | |
1522 | 1522 | | |
1523 | | - | |
| 1523 | + | |
1524 | 1524 | | |
1525 | 1525 | | |
1526 | 1526 | | |
| |||
0 commit comments