Query Stats Detail

Detailed statistics about a specific SQL server query

The Query Stats Detail dashboard focuses on a single query (text or normalized text) and shows how each compiled plan for that query performed over the selected interval.

Top: Query text

  • The full SQL text (or normalized text) is shown at the top for context.
  • Use the copy and download controls to move the text into SSMS or a local editor.
  • Use the format button to view a formatted version of the query text

Plans summary table (Totals by plan)

  • A compact table that lists each plan compiled for this query with totals and averages:
    • Execution count
    • Worker time (total)
    • Total time (total)
    • Averages (worker time / exec, total time / exec)
    • Rows returned
    • Memory grant (total)
  • Use the table to quickly identify the highest-cost plans and their relative impact.

Totals section

  • This section contains a time-series table of 5-minute aggregated samples for the selected time frame. Each row represents a 5-minute bucket and includes:
    • Sample time
    • Execution count
    • Logical reads
    • Logical writes
    • Memory
    • Physical reads
    • Rows
    • Total time
    • Worker time
    • Plan hash (clickable)
  • Plan hash actions:
    • Click a plan hash to download the plan as a .sqlplan file.
    • Open the downloaded .sqlplan in SSMS to inspect the graphical plan and operator costs.
  • Charts in Totals:
    • Execution count by plan
    • Memory by plan
    • Total time by plan
    • Worker time by plan
  • Use these charts to compare plan behavior over time and to spot periods where a specific plan dominated resource usage.

Averages section

  • Similar to Totals, but values are averaged per sample or per execution:
    • The table shows the same 5-minute samples with averaged metrics (per-exec averages where applicable).
    • Columns mirror the Totals table (execution count, reads, writes, memory, physical reads, rows, total time, worker time, plan hash).
  • Charts in Averages:
    • Total time (avg) by plan
    • Worker time (avg) by plan
  • Use averages to find plans with high per-execution cost even if execution counts are low.

Controls and investigation tips

  • Use the dashboard time-range controls to focus on the interval of interest.
  • Filter or sort the tables by plan hash, execution count, or cost metrics to prioritize investigation.
  • Download and open .sqlplan files in SSMS to review operator costs, warnings, and estimated vs actual row counts.
  • Compare Totals and Averages: high totals with low averages usually indicate frequent cheap executions; high averages suggest expensive single executions.