Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

sys.dm_exec_query_stats

$
0
0

In the DMV - sys.dm_exec_query_stats, I see in BOL:

total_elapsed_time

bigint

Total elapsed time, reported in microseconds (but only accurate to milliseconds), for completed executions of this plan.

last_elapsed_time

bigint

Elapsed time, reported in microseconds (but only accurate to milliseconds), for the most recently completed execution of this plan.

min_elapsed_time

bigint

Minimum elapsed time, reported in microseconds (but only accurate to milliseconds), for any completed execution of this plan.

max_elapsed_time

bigint

Maximum elapsed time, reported in microseconds (but only accurate to milliseconds), for any completed execution of this plan.

When I see last elapsed time as: 3906, is it 3.9 ms ?

So, if the total elapsed time is: 5255857 ans execution count is 1421 - Avg elapsed time - (5255857/1421)/1000 = 3.6 ms

Am i missing something ?

The reason for this post is , i have seen several queries that has the belowcalculation, are they reporting Microseconds as Milliseconds ?

qs.total_elapsed_time/qs.execution_count AS "Avg Duration (ms)"


Ranga


Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>