rghazarian
rghazarian

Reputation: 260

SQL Server DMV table dm_exec_requests, elapsed_time, cpu_time, wait_time

In SQL Server DMV table dm_exec_requests, should the following be true:

total_elapsed_time = cpu_time + wait_time

Thanks, Rafi

Upvotes: 0

Views: 878

Answers (1)

Filip Popović
Filip Popović

Reputation: 2655

No it is not equal. As stated on MSDN:

cpu_time - CPU time in milliseconds that is used by the request. Is not nullable.

and

wait_time - If the request is currently blocked, this column returns the duration in milliseconds, of the current wait. Is not nullable.

As You can see, wait_time is duration of current wait and You may have multiple waits during query execution.

Upvotes: 1

Related Questions