SQL Server Database Query Store


The SQL Server Database Query Store page focuses Query Store analysis on one database. It is useful when one database owns the workload problem or when server-level Query Store data is too broad.

Mini DBA SQL Server database Query Store

What You Can Review

  • Top resource-consuming queries in the selected database.
  • Query performance by time range.
  • Plan buckets and plan changes.
  • Query Store properties for the database.
  • Execution plans where available, including operator drill-down and AI plan review.

Workflow

  1. Open the database from SQL Server Databases.
  2. Select Query Store.
  3. Choose a time range.
  4. Review top resource queries.
  5. Load plan details for the statement you are investigating and review SQL Server Execution Plans.
  6. Compare with Database Detail and Indexes.

How To Use Database Query Store

Database Query Store is ideal when the performance problem belongs to one SQL Server database. It keeps the investigation focused on database-specific runtime history, plans, and regressions instead of mixing evidence from the whole instance.

Start with the problem time window. Sort by duration, CPU, reads, writes, execution count, or regression depending on the symptom. If a query changed behavior after a release or statistics update, compare plans and runtime before and after the change. Then use SQL Server Indexes and SQL Server Database Detail for supporting evidence.

Query Store is especially valuable for intermittent issues because the slow statement may no longer be active by the time you open SQL Server Activity. Historical runtime data helps prove whether a plan or workload changed.

If the selected query has plan detail, use the execution plan viewer to drill into expensive operators and warnings before proposing indexes or query rewrites. Keep the Query Store query ID, plan ID, time window, and plan evidence together.

Database Query Store FAQ

When should I use database Query Store instead of server Query Store?

Use database Query Store when one database owns the workload problem or when server-level data is too broad.

Why is the time range important?

The right time range keeps the evidence aligned with the user complaint, release, job, or alert.

What if Query Store is not enabled?

Review local SQL Server policy before enabling it. Query Store settings should be controlled by your DBA process.

Related Pages