You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your question about how they work, or the results?
how the scripts work
Okay, what's your question?
Consider the column in the expert mode output called last_cpu_time_ms. When I read that, I think "this is the cpu time in ms from the last time that the plan/query ran". Inspecting the code, we see that it is defined as MAX((qsrs.last_cpu_time / 1000.)) over a grouping of plan_id. That means that it's not the value from the last run, it's the maximum of the last runs over all of the time periods in the time interval we're considering. I discovered this after running sp_QuickieStore multiple times in a day. Each time, I saw the same frighteningly high value in one of the last_ fields even though I knew that the query in question ran hundreds of times per hour. I was very confused. The other various last_ columns share this behaviour.
My question is just "is this behaviour what we want?". I can't call it a bug, because this was quite obviously done on purpose.
Done that. I'm perfectly happy to contribute, but if my work on finding regressed queries is anything to go by (it's nearly done, I swear!), then you will be waiting months.
The text was updated successfully, but these errors were encountered:
Which script is your question about?
Script Name:
sp_QuickieStore
Script version
4.9
Is your question about how they work, or the results?
how the scripts work
Okay, what's your question?
Consider the column in the expert mode output called
last_cpu_time_ms
. When I read that, I think "this is the cpu time in ms from the last time that the plan/query ran". Inspecting the code, we see that it is defined asMAX((qsrs.last_cpu_time / 1000.))
over a grouping ofplan_id
. That means that it's not the value from the last run, it's the maximum of the last runs over all of the time periods in the time interval we're considering. I discovered this after runningsp_QuickieStore
multiple times in a day. Each time, I saw the same frighteningly high value in one of thelast_
fields even though I knew that the query in question ran hundreds of times per hour. I was very confused. The other variouslast_
columns share this behaviour.My question is just "is this behaviour what we want?". I can't call it a bug, because this was quite obviously done on purpose.
IMPORTANT: If you're going to contribute code, please read the contributing guide first.
https://github.com/erikdarlingdata/DarlingData/blob/main/CONTRIBUTING.md
Done that. I'm perfectly happy to contribute, but if my work on finding regressed queries is anything to go by (it's nearly done, I swear!), then you will be waiting months.
The text was updated successfully, but these errors were encountered: