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
At "Last 7 days" the WPF Queries grids silently show ~4 days: Top Queries, Top Procedures and Query Store read raw tables dropped at 4 days, with no floor disclosure (get_query_store_top got one in #2364; the viewer and the query-stats MCP tools didn't) #4231
The WPF server tab's toolbar offers "Last 7 days". Three Queries sub-tabs read only raw tables, and all three are dropped at 4 days on a store with the rollups armed:
grid
table
Top Queries by Duration
query_stats
Top Procedures by Duration
procedure_stats
Query Store by Duration, and its slicer
query_store_stats
None of these reads routes to a rollup, and none reports how far back it actually reached. At 7 days the grid ranks about 4.2 days of work under a header and toolbar that say 7, and nothing on screen says so.
#2364 fixed exactly this for MCP get_query_store_top: it reads the window floor and returns effective_start / window_truncated. The WPF Query Store grid, the WPF Top Queries and Top Procedures grids, and MCP get_top_queries_by_cpu / get_top_procedures_by_cpu never got the same treatment. The WPF viewer's own Performance Trends tab does disclose (QueryTrendSeries.Truncated, rendered in the plot title), so one tab of one screen is honest and the grid beside it isn't.
It's also the expensive way to be wrong: the 7-day read scans and dedupes all 4 days of raw.
Measured
2026-09-25, read-only:
Raw floors. Production SQL Server store B: query_stats and procedure_stats both start at 2026-09-21 00:00, 4.19 days back at 04:32Z. Store A (live Query Store), one busy server: query_store_stats starts at 2026-09-21 00:02, 918,803 rows in the "7-day" window.
The WPF Query Store grid's read (QueryStoreTopSql) at 7 days, same server:4,078 ms, 162.9 k buffers (28 k read). The window sort spilled: external merge of 100 + 121 + 203 MB, 53 k temp blocks written, at that store's current work_mem. At 24 h the same read is 1,090 ms with no spill.
Where (origin/dev)
Darling/PerformanceMonitor.Darling.Viewer/ViewerServerTab.Queries.cs: LoadTopQueriesAsync ~:172, LoadTopProceduresAsync ~:181, LoadQueryStoreAsync ~:190. None reads a floor or renders one.
Darling/PerformanceMonitor.Darling.Viewer/ViewerDataService.QueryStats.csTopQueriesSql ~:149, ViewerDataService.ProcedureStats.csTopProceduresSql ~:88, ViewerDataService.QueryStore.csQueryStoreTopSql ~:123 and QueryStoreSlicerSql ~:595.
The disclosure that exists: Darling/PerformanceMonitor.Darling.Service/Mcp/DarlingMcpDataTools.csget_query_store_top ~:796–880, and DarlingDataReader.QueryStoreWindowFloorSql ~:1323 (a bounded MIN(collection_time), a one-chunk probe).
The tools without it: DarlingMcpDataTools.csget_top_queries_by_cpu ~:515/:560 and get_top_procedures_by_cpu ~:671/:690, both over raw DarlingDataReader.TopQueriesSql / procedure reads.
Fix shape
Disclose, in every grid and tool that reads a raw-only table:
in the MCP tools, return effective_start / effective_hours_back / window_truncated like get_query_store_top.
And/or route.query_stats and procedure_stats have query-grain hourly rollups (query_stats_hourly, procedure_stats_hourly) that the Performance Trends and FinOps reads already stitch through RollupCoverage. A top-N by total over a window past raw retention can be served from them, the same way the trend tier ladder does it. query_store_stats has no rollup that carries query_id/plan_id (get_query_store_top reports a window it cannot serve: raw query_store_stats is dropped at 4 days #2364's note), so its only honest option is the disclosure.
Pins:
a live test on a seeded store whose raw table is shorter than the window: the WPF grid's header text, and each MCP tool's window_truncated / effective_start, name the floor;
a source pin that every Queries-tab grid read passes through the shared floor helper.
Problem
The WPF server tab's toolbar offers "Last 7 days". Three Queries sub-tabs read only raw tables, and all three are dropped at 4 days on a store with the rollups armed:
query_statsprocedure_statsquery_store_statsNone of these reads routes to a rollup, and none reports how far back it actually reached. At 7 days the grid ranks about 4.2 days of work under a header and toolbar that say 7, and nothing on screen says so.
#2364 fixed exactly this for MCP
get_query_store_top: it reads the window floor and returnseffective_start/window_truncated. The WPF Query Store grid, the WPF Top Queries and Top Procedures grids, and MCPget_top_queries_by_cpu/get_top_procedures_by_cpunever got the same treatment. The WPF viewer's own Performance Trends tab does disclose (QueryTrendSeries.Truncated, rendered in the plot title), so one tab of one screen is honest and the grid beside it isn't.It's also the expensive way to be wrong: the 7-day read scans and dedupes all 4 days of raw.
Measured
2026-09-25, read-only:
query_statsandprocedure_statsboth start at 2026-09-21 00:00, 4.19 days back at 04:32Z. Store A (live Query Store), one busy server:query_store_statsstarts at 2026-09-21 00:02, 918,803 rows in the "7-day" window.QueryStoreTopSql) at 7 days, same server: 4,078 ms, 162.9 k buffers (28 k read). The window sort spilled:external mergeof 100 + 121 + 203 MB, 53 k temp blocks written, at that store's currentwork_mem. At 24 h the same read is 1,090 ms with no spill.Where (origin/dev)
Darling/PerformanceMonitor.Darling.Viewer/ViewerServerTab.Queries.cs:LoadTopQueriesAsync~:172,LoadTopProceduresAsync~:181,LoadQueryStoreAsync~:190. None reads a floor or renders one.Darling/PerformanceMonitor.Darling.Viewer/ViewerDataService.QueryStats.csTopQueriesSql~:149,ViewerDataService.ProcedureStats.csTopProceduresSql~:88,ViewerDataService.QueryStore.csQueryStoreTopSql~:123 andQueryStoreSlicerSql~:595.Darling/PerformanceMonitor.Darling.Service/Mcp/DarlingMcpDataTools.csget_query_store_top~:796–880, andDarlingDataReader.QueryStoreWindowFloorSql~:1323 (a boundedMIN(collection_time), a one-chunk probe).DarlingMcpDataTools.csget_top_queries_by_cpu~:515/:560 andget_top_procedures_by_cpu~:671/:690, both over rawDarlingDataReader.TopQueriesSql/ procedure reads.Fix shape
effective_start/effective_hours_back/window_truncatedlikeget_query_store_top.query_statsandprocedure_statshave query-grain hourly rollups (query_stats_hourly,procedure_stats_hourly) that the Performance Trends and FinOps reads already stitch throughRollupCoverage. A top-N by total over a window past raw retention can be served from them, the same way the trend tier ladder does it.query_store_statshas no rollup that carriesquery_id/plan_id(get_query_store_top reports a window it cannot serve: raw query_store_stats is dropped at 4 days #2364's note), so its only honest option is the disclosure.window_truncated/effective_start, name the floor;