You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
get_query_store_regressions sorts eight days of raw query_store_stats rows that the interval tables already dedupe #5809
Field (store A, the largest SQL Server fleet store; build 3.10.0-nightly.20261013.547; pm-worker, 2026-10-14)
14 days: 10 calls, 173 s, mean 17.3 s, p95 45 s, max 37.5 s. All 7 reads of 5 s or more since 10-05 asked for a 24 h window; the slowest statement is WITH deduped_baseline AS (, 37.4 s.
Code
Darling/PerformanceMonitor.Darling.Service/Mcp/DarlingQueryStoreRegressionReader.cs near line 94 reads raw collect.query_store_stats twice, the baseline [window start minus 7 days, window start) and the recent window, each with ROW_NUMBER() OVER (PARTITION BY seven keys ORDER BY collection_time DESC, execution_count DESC) to keep the latest snapshot per interval, then groups by database and query. The viewer's twin (Darling/PerformanceMonitor.Darling.Viewer/ViewerDataService.QueryStoreRegressions.cs near line 115) has the same shape. The read uses no interval table, rollup or daily summary, while get_query_store_top (#5168) and the history read (#5523, #5533) moved to query_store_interval_wide and query_store_interval_latest, which already hold the latest snapshot per interval and are bounded on first_execution_time both sides.
Hypothesis (inferred)
A window sort over eight days of raw rows, twice per call; time tracks raw row volume. The dedupe is work the interval tables already did at write time.
The viewer calls the shared reader rather than keeping a copy, if the viewer's data service can take it; otherwise its copy takes the same shape in the same PR.
A live test plants rows that regress between baseline and window and shows the same regressions from the new read as from the old.
Done when
The live test passes on both paths (interval and raw fallback), and pm-worker's recheck on store A shows a 24 h call under 5 s at p95.
Activity
Viewer regressions read takes the same interval-table route, wide hor…
Regressions table read: declare the table arms before the field that …
Three interval-partition tests move to the 10-day wide horizon (#5809)
Three far-future and legacy-drop convergence tests move to the 10-day…
Regressions table live test seeds through LiveClock (#5809)
Regressions table read: a named read-only statement the store census …
Four more present-tense 9-day statements now say 10, V145's rung keep…
Load-test purge edge reads WideHorizonDays; README windows follow the…
Partition drop live test comments describe what it plants and asserts (…
Query Store regressions read the per-interval table instead of re-sor…
erikdarlingdata commentedon Oct 15, 2026
Claude posting for Erik Darling.
Fixed by #5826 (8f42150) on dev.