Skip to content

Query Store Regressions: no drill-down to compare baseline vs recent #274

@erikdarlingdata

Description

@erikdarlingdata

Current State

The Query Store Regressions tab shows a flat grid with 15 columns:

  • Last Execution, Severity, Database, Query ID, Duration Δ%, Base Duration, Recent Duration, CPU Δ%, Base CPU, Recent CPU, I/O Δ%, Base Reads, Recent Reads, Query Text

No drill-down exists — clicking a row does nothing. This is the tab that most needs a drill-down because the whole point of a regression view is to see what changed over time.

What's Missing

No drill-down

The existing QueryExecutionHistoryWindow already shows Query Store data over time for a given query_id + database_name — it has the chart, per-plan color coding, and all the metrics. The Regressions tab already has QueryId and DatabaseName available.

A double-click or "View History" button on a regression row should open QueryExecutionHistoryWindow for that query, which would immediately show:

  • The timeline of duration/CPU/reads changes
  • Multiple plans color-coded (plan regressions often involve plan changes)
  • The exact point where performance degraded

Model has QueryPlanXml but it's never loaded

QueryStoreRegressionItem.QueryPlanXml exists in the model but the SQL query doesn't SELECT it and the reader doesn't populate it.

Missing from TVF / not displayed

The TVF (report.query_store_regressions) currently returns baseline vs recent averages. Additional useful data available in collect.query_store_data:

  • Baseline/Recent execution counts — how many executions in each period (regression on 2 executions vs 2000 matters)
  • Baseline/Recent plan_id — did the plan change? This is the Add check for updates feature #1 cause of regressions
  • Memory grant changes — baseline vs recent avg_query_max_used_memory
  • Physical reads changes — cold cache regressions
  • Writes regressionavg_logical_io_writes baseline vs recent

Recommendation

The simplest high-value fix: wire up double-click to open QueryExecutionHistoryWindow with the query_id. The existing drill-down already shows everything needed to diagnose the regression — no new window required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions