2

We have executions/min is too high, around 20,000 to 30,000 for a query. Does this means the query is executing 20,000 per minute? I don't think we have that much load on server that a single query runs 20,000 per minute.

Also, I am always confused with CPU ms/sec. Does this means total CPU used per second? If yes how come we have lot of queries with 1000+ CPU ms/sec as we have limited CPU on server.

2
  • What is the source of the message, monitoring tool ?
    – Shanky
    Commented Feb 25, 2021 at 8:37
  • Activity Monitor Commented Feb 25, 2021 at 8:47

1 Answer 1

4
+50

One possible way to run a query very many times is to use a scalar user defined function as that will execute once per row in the query.

If you have multiple CPU cores each one can support 1000ms / second which is why total CPU appear strange and go over what seems possible

2
  • executions/min means query is executing 20,000 times per minutes? Commented Feb 27, 2021 at 6:20
  • Yes which is 333 execs / sec - that seems entirely possible. To get to the bottom of why your server has a high number of executions you are going to need to run Query Store, Extended Events or a Trace. Probably the quickest and easiest way for you is to use Erik's SP which will create an extended events session and analyze the results for you erikdarling.com/sp_humanevents They've been 3 recs on my answer - so I'd like to know in what way it is deficient so I can add additional details and you then feel able to accept it - thanks Commented Mar 7, 2021 at 11:05

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.