- Fix queries that have regressed recently
- Determine the number of times a query was executed
- Identify top queries
- Audit the history of query plans for a given query
- Analyze the resource usage patterns for a particular database
- SQL server 2017 version shows us wait stats for each query
Run one simple command to enable Query store on a database
ALTER DATABASE [DatabaseName] SET QUERY_STORE = ON;
Options
Operation Mode
Data Flush Interval (Minutes)
Statistics Collection Interval
Max Size (MB)
Query Store Capture Mode – AUTO | ALL | NONE
Size Based Cleanup Mode – AUTO | OFF
State Query Threshold (Days)