April 23, 2026 at 4:37 pm
I have a plan which in sys.query_store_plan shows:
Last_compile_start_time of 2026-04-23 00:13:00.7670000 +00:00
Last_execution_time of 2026-04-23 00:30:18.7770000 +00:00
Last_compile_duration of 17105
Sys.query_store_runtime_stats for the plan, between 2026-04-23 00:00:00 and 2026-04-23 01:00:00, show an avg_duration of 74429 and execution_count of 1
sys.query_store_wait_stats shows a CPU and Buffer IO waits totalling 33ms
So if I follow correctly?:
The plan compilation started at 00:13:00 and took less than a second
The query took less than a second and finished at 00:30:00
In which case there is around 17 minutes between the end of the compilation and the start of the query running and I'm trying to understand why that would happen.
If I understand correctly then if the CPUs are busy then the schedulers will alternate between the worker threads so that shouldn't prevent a query from starting and any delays would show up as cpu waits?
Are there situations where for example, if the server is low on memory, the query won't start and won't error? I did some reading around that but didn't find anything.
I'm not asking for anyone to write out all the possible scenarios I'd just appreciate some advice on whether I've missed something, where to look next or any relevant topic which I've missed and need to go and read about.
Thanks
Viewing post 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply