SQL Server Query store introduced in SQL Server 2016 stores multiple query plans per query. This information gathered over time is helpful in troubleshooting performance issues for a query over time, unlike procedural cache which stores only last plan. Please use this tag if you are using SQLAzure or versions greater than SQLServer 2016
Common scenarios for using the Query Store feature are:
- Quickly find and fix a plan performance regression by forcing the previous query plan. Fix queries that have recently regressed in performance due to execution plan changes.
- Determine the number of times a query was executed in a given time window, assisting a DBA in troubleshooting performance resource problems.
- Identify top n queries (by execution time, memory consumption, etc.) in the past x hours.
- Audit the history of query plans for a given query.
- Analyze the resource (CPU, I/O and Memory) usage patterns for a particular database.