0

I've been trying to measure the execution time of some queries executed from an application. I've been trying to use sys.dm_exec_query_stats.last_elapsed_time but I'm confused about the values that it is returning. When I execute the query

SELECT TOP 1 qs.plan_handle, qs.last_execution_time, qs.last_elapsed_time, qs.min_elapsed_time FROM sys.dm_exec_query_stats qs ORDER BY qs.last_execution_time DESC

from the ssms, it clearly executes and returns the results just as soon as the display can refresh, clearly much faster than one second. However, the values being returned for last_elapsed_time are consistently around 1700-1800 milliseconds.

What am I missing?

Here is the msdn info page on sys.dm_exec_query_stats. I'm using sql server 2012.

4

1 回答 1

1

它们不是毫秒值,而是 MICROsecond 值,正如在表的 msdn 信息页面上明确说明的那样。

于 2014-03-24T17:33:30.210 回答