sp_Blitz: Add check for very high Query Store memory usage #3533
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes item 8 in #3527. Other items in that issue remain open.
I really didn't do anything smart while making this. I just cracked open the docs for sys.dm_os_memory_clerks and searched for references to Query Store.
1 GB was chosen utterly arbitrarily. I have no idea what can reasonably be considered a ridiculously high amount of Query Store memory usage. I've never seen a box crack 0.75 GB.
I've made this a priority 50 issue under the 'Performance' header. If your Query Store is eating a ridiculous amount of memory, then you have something interesting going on and ought to look. Everything with a number higher than 50 under the same header seemed far less important.
No useful URL has come to mind. Online research about Query Store overhead never mentions checking this metric, even though
sys.dm_os_memory_clerks
is the basis for a few of our checks. I could link to a generic guide on how to configure Query Store, but that wouldn't focus on the problem.This is my first new check for sp_Blitz, so it's quite likely that it's missing something important. It's passed the limited suite of tests that I've tried on my local instance.