Skip to content
Tool Review · Performance & Query Optimization

Query Store

Query Store is the SQL Server and Azure SQL feature that records each database's query history, plans, runtime and wait statistics, lets you force a previous plan, and (from SQL Server 2022) apply Query Store hints without code changes.

Free Research-based review
Last verified November 2026. Features and pricing for commercial products change; check the vendor site for the latest details.
Vendor
Microsoft
Price
Free
Platforms
Windows, Linux, Azure SQL Database, Azure SQL Managed Instance, Microsoft Fabric
Licence
Included with SQL Server and Azure SQL (no separate licence)
Product type
Built-in SQL Server and Azure SQL feature
Works with
SQL Server 2016 and laterAzure SQL DatabaseAzure SQL Managed InstanceAzure Synapse Analytics (dedicated SQL pool)SQL database in Microsoft Fabric

At a glance

Supported databasesSQL Server 2016+, Azure SQL Database and Managed Instance, Synapse dedicated pools, Fabric SQL database
Query analysisTop queries by duration, CPU, IO, memory and more, over time
Execution plansMultiple stored plans per query, plan comparison and forcing
Wait statisticsPer query, by wait category (SQL Server 2017+)
Index recommendationsNot part of Query Store (Azure SQL automatic tuning and missing-index DMVs are separate)
Slow-query detectionRegressed Queries report; no built-in alerting
Tuning automationManual plan forcing and hints; automatic plan correction is a separate automatic tuning feature (Enterprise in SQL Server 2025)
Default stateOn for new databases from SQL Server 2022 and in Azure SQL; off on 2016-2019
LicensingIncluded in all SQL Server 2025 editions, including free Express
Short answer

Turn Query Store on everywhere before buying anything else. It is built in, on by default for new databases from SQL Server 2022 and in Azure SQL, and answers the most common performance question: which query got slower, and did its plan change. It is per database and has no alert routing or estate view, which is where commercial monitors earn their place.

How we know: This profile is research-based: supported platforms, defaults, features and edition availability were checked on 7 November 2026 against Microsoft Learn: Monitor performance by using the Query Store, Query Store hints, Query Store for secondary replicas and Editions and supported features of SQL Server 2025. We have not measured Query Store overhead.

Overview

Query Store, introduced in SQL Server 2016, keeps a per-database history of queries, their execution plans and runtime statistics, aggregated into time windows and written asynchronously. From SQL Server 2017 and in Azure SQL Database it also stores wait statistics per query, grouped into wait categories. Because it keeps several plans per query, you can force a known good plan when a plan change causes a regression, without touching application code.

Microsoft states it is on by default in READ_WRITE mode for new databases from SQL Server 2022 and for new Azure SQL Database and Managed Instance databases, but not on SQL Server 2016, 2017 or 2019 or new Azure Synapse databases, and it cannot be enabled for master or tempdb. SQL Server 2022 added Query Store hints, which inject query hints by query_id through sys.sp_query_store_set_hints, and SQL Server 2025 adds Query Store for secondary replicas, so readable secondaries report into the primary's store.

Key features

  • Per-database history of query text, plans and runtime statistics (duration, CPU, reads, writes, memory, tempdb) in time windows
  • Per-query wait statistics by wait category (SQL Server 2017 and later, Azure SQL)
  • Plan forcing and unforcing from SSMS reports or sp_query_store_force_plan
  • Query Store hints (SQL Server 2022 and later, Azure SQL, Fabric): apply hints such as RECOMPILE or MAXDOP by query_id without changing code
  • SSMS reports including Regressed Queries and Query Wait Statistics
  • Catalog views such as sys.query_store_query, sys.query_store_plan and sys.query_store_runtime_stats for your own queries
  • Query Store for secondary replicas (SQL Server 2025 Enterprise, Azure SQL Database)

Integrations and ecosystem

SQL Server Management Studio reportsAzure portal Query Performance InsightAzure SQL automatic tuningCommercial monitors such as SQL Sentry, Redgate Monitor and SQLGrease

Pros and cons

Pros

  • No extra cost, and available even in SQL Server Express
  • On by default for new databases from SQL Server 2022 and in Azure SQL
  • Plan forcing and Query Store hints fix regressions without code changes
  • Data survives restarts, unlike the plan cache
  • Every major SQL Server monitoring tool can read it

Cons

  • Per database: no estate-wide dashboard, alert routing or notification
  • Needs configuration of size and capture settings to avoid filling up on busy databases
  • Not enabled by default on SQL Server 2016, 2017 or 2019
  • Secondary replica support and automatic tuning are Enterprise only in SQL Server 2025

Pricing

Query Store ships with the database engine and has no charge of its own. In SQL Server 2025, Microsoft lists Query Store, on-by-default for new databases and Query Store hints in Enterprise, Standard and the free Express edition, so it can be used at no cost; production use of Standard or Enterprise needs a SQL Server licence, and in Azure it is part of the Azure SQL service you pay for. Two related features are edition-limited in SQL Server 2025: Query Store on secondary replicas and automatic tuning are Enterprise only.

Pricing checked on the vendor's official page on 7 November 2026. Prices change; confirm before buying.

Who it is best for

Every SQL Server and Azure SQL database as the baseline for query performance history, plan regression fixes and hint injection.

Typical use cases

  • Finding and fixing a plan regression after an upgrade or statistics change by forcing the previous plan
  • Listing the top queries by CPU or duration over the last day
  • Applying a RECOMPILE or MAXDOP hint to a vendor application query you cannot edit
  • Comparing query performance before and after a compatibility level change

Who should look elsewhere

Verdict

Our take

Query Store is the free foundation of SQL Server performance work: history, plans, waits and the ability to fix regressions without code changes. Enable and size it on every database, and add a commercial monitor only when you need alerting, estate views or longer cross-server history.

Frequently asked questions

Is Query Store enabled by default?

For new databases from SQL Server 2022 (16.x), yes, in READ_WRITE mode, and for new Azure SQL Database and Managed Instance databases. It is not on by default on SQL Server 2016, 2017 or 2019, or for new Azure Synapse databases.

Does Query Store cost extra?

No. It is part of the database engine, and Microsoft lists it in SQL Server 2025 Enterprise, Standard and the free Express edition. Query Store on secondary replicas is Enterprise only.

What are Query Store hints?

A SQL Server 2022 and Azure SQL feature that attaches query hints, such as RECOMPILE, MAXDOP or a compatibility level, to a query by its Query Store query_id using sys.sp_query_store_set_hints. Hints persist across restarts and failovers and override plan guides.

Does Query Store recommend indexes?

No. It records history and lets you force plans or apply hints. Index suggestions come from other features such as missing-index DMVs or automatic tuning in Azure SQL Database.

Sources

Checked November 2026.

Listed in: Performance & Query Optimization.

How we research reviews and what star ratings mean: our editorial method.

Compare your options

Browse the full tools directory or see the head to head comparisons.