-
Notifications
You must be signed in to change notification settings - Fork 182
Description
Version of the script
G'day Erik! Using the current version, 5.1
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.
A recent execution of your brilliant script, to which I passed @database_name = '<db_name>', @format_output = 1, @Timezone = 'Central Standard Time', @start_date = '20250228 09:30', @end_date = '20250314 09:30', @top = 15, @sort_order = 'executions' and @duration_ms = 10000, returned 15 results, of which the top 3 had execution counts of 2,204, 277 and 257 respectively. Subsequent results had less than 20 executions.
Running the script again with @execution_count = 35 added (all other parameters left the same) returned no results (#query_store_runtime_stats is empty). I also ran the execution-count-included script with @expert_mode = 1 and the output was the same (no results).
What is the expected behavior?
I would have expected the second execution to return the top 3 results seen in the first execution, each of which had executions well in excess of 35.
Which versions of SQL Server and which OS are affected by this issue? Did this work in previous versions of our procedures?
We are currently running SQL 2016, build 13.0.7050.2 (I know, I know.. we're about to upgrade to 2022). The OS on the SQL Server box is Windows Server 2016/2019 era, version 10.0. I don't recall running this particular scenario on earlier versions of the script.
Comment
Might this be expected behavior from the script somehow? If so it strikes me as illogical - the results don't fit the parameters passed. It seems like a bug. Thanks for having a look.