Query Stats

General Workload analysis

The Query Stats dashboard summarizes workload characteristics and surfaces high cost queries so you can prioritize tuning and capacity decisions.

At the top:

  • Worker Time by Database: a chart that shows query worker time (CPU) attributed to each database. Use this to spot databases driving CPU usage and to compare trends over time.
  • Logical Reads by Database: a chart that shows logical page reads per database. High or rising reads indicate I/O pressure or inefficient query plans.

Below the charts are three sections that drill into queries and their history.

Query Stats by Database and Query

  • Shows top queries grouped by database and text (or normalized text).
  • Columns include cumulative worker time, logical reads, duration, and execution count. Use this view to find the heaviest queries within a specific database.
  • Use filters and sorting to narrow by database, application, or host, then click a row to open the query detail dashboard.

Query Stats by Query

  • Aggregates statistics across databases for identical or normalized query text. This helps identify widely-used queries or shared code paths that impact multiple databases.
  • Columns include totals and averages (CPU, reads, duration, executions) and can be used to detect candidates for indexing, parameterization, or query rewrite.

Query Regressions

  • Highlights queries with significant changes in performance over the selected time window (for example, increases in duration, CPU, or logical reads).
  • Uses baseline comparisons and historical plan information to flag likely regressions caused by plan changes, data distribution shifts, or blocking.
  • Click a query hash to inspect historical plans, execution stats, and complete query text.

Query Store and data sources

  • Query statistics are gathered from QMonitor event capture and, when enabled, from SQL Server Query Store. Query Store provides persisted plan history and runtime aggregates that are useful for regression analysis and plan forcing.
  • If Query Store is disabled or unavailable, QMonitor will use Query Stats.

Investigating queries

  • Drill into a query to view SQL text, execution plans, and example runtime statistics. Compare current and historical plans to identify plan changes.
  • Check execution counts — high cumulative cost with many executions may be fixed via caching or tuning; high single-execution cost may need plan-level fixes.
  • Use execution plans, wait types, and logical reads to decide between indexing, query rewrite, statistics updates, or parameter sniffing mitigations.

Controls and tips

  • Use the time-range selectors and per-column filters to focus analysis on the relevant interval and workloads.
  • Sort by cumulative worker time or logical reads to prioritize the biggest opportunities.
  • When investigating regressions, capture a longer history where possible to distinguish transient spikes from sustained regressions.

Query Stats Detail

Detailed statistics about a specific SQL server query