1

Is there a way to specify when QueryStore should perform cleanup based on the STALE_QUERY_THRESHOLD_DAYS setting? I am currently experiencing issues when the cleanup kicks in at peak times.

i.e. we have QueryStore set to clear out data older that 30 days, but I want to be able to set it to do this cleanup at 23:00 (during Maintenance hours). This is not related to the SIZE_BASED_CLEANUP_MODE setting - there is set to AUTO and there is plenty of space available - i.e.

I know of the command to completely clear QueryStore for a Database. I don't want to do that. I want to control when the cleanup operation runs.

I have thoughts about a possible workaround, but would be interested in hearing if anyone knows how SQL Server decides when to do the cleanup, and how I can take control.

Many thanks.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.