Presentation is loading. Please wait.

Presentation is loading. Please wait.

Go, go Query Store! Gail Shaw.

Similar presentations


Presentation on theme: "Go, go Query Store! Gail Shaw."— Presentation transcript:

1 Go, go Query Store! Gail Shaw

2 The Query what? New in SQL 2016 / Azure db version 12
A ‘flight recorder’ for SQL Server queries Aggregated performance information and execution plan Persisted into the database

3 What magic is this? On compilation, the query and plan are stored in the Query Store When a query is recompiled, the new plan is sent to the Query Store If it’s a different plan to ones already in the Query Store, it’s added When query execution completes, run-time info is sent to the Query Store Data is written to disk in 15-minute intervals (configurable) Run time stats are aggregated, default 60 minutes

4 But, we’ve already got DMVs
The run-time DMVs depend on a query having a plan in cache They don’t record queries run with any recompile setting They’re memory only. Query Store is persisted into the user database Doesn’t rely on plans still being in cache Is included in backups!

5 Ok, so how do I use it? SSMS 2016 has reports built in
Or, lots of catalogue views sys.query_store_query sys.query_store_query_text sys.query_store_plan sys.query_store_runtime_stats sys.query_store_runtime_stats_interval

6 Uses for Query Store Upgrade tests
Identify cases of parameter sniffing or other unstable plan problems Pinpoint the top resource consuming queries, without needing SQLTrace/XE

7 Further resources Monitoring performance using the Query Store - How the Query Store collects data - us/library/mt aspx recorder-for-your-database/


Download ppt "Go, go Query Store! Gail Shaw."

Similar presentations


Ads by Google