Query Store – What can it do for us?

  1. Fix queries that have regressed recently
  2. Determine the number of times a query was executed
  3. Identify top queries
  4. Audit the history of query plans for a given query
  5. Analyze the resource usage patterns for a particular database
  6. 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)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: