Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Query Store feature helping lot of SQL Admin in isolating top resource consuming queries quickly and also troubleshooting plan choice regressed scenario which is difficult to isolate or time consuming process. Now with powerful report and using few clicks you can check top resource consuming query and force optimum plan. In this article I would like to highlight some of best practices if you are enabling Query Store on mission critical and high transactions Server
So as you already know that Query Store have following capture Mode for data collection:
All – Captures all queries. This is the default option.
Auto – Infrequent queries and queries with insignificant compile and execution duration are ignored. Thresholds for execution count, compile and runtime duration are internally determined.
None – Query Store stops capturing new queries.
QDS store runtime stats in cache until they are persisted on disk asynchronously, you could track memory usage using memory clerk USERSTORE_QDSSTMT & CACHESTORE_QDSRUNTIMESTATS. So write operation from cache to disk is very fast and you may not see large memory allocation against these memory clerks however workload with a lot of frequent ad hoc/unparameterized queries would make cache to grow.
If are running QDS with capture mode “ALL” on busy Server or mission CRITICAL Server then consider following best practices to save cache memory and reduce database recovery time:
References
Best Practice with the Query Store /en-us/sql/relational-databases/performance/best-practice-with-the-query-store
Query Store Usage Scenarios /en-us/sql/relational-databases/performance/query-store-usage-scenarios
Vikas Rana | Twitter | Linkedin | Support Escalation Engineer
Microsoft India GTSC
Please sign in to use this experience.
Sign in