摘要:
sql server 2005中增加了动态性能视图,可以查看sys.dm_exec_query_stats获得正在执行的SQL的一些信息。下面的SQL语句查询当前运行时间最长的10个事务的信息:SELECT DISTINCT TOP 10 t.TEXT QueryName, s.execution_count AS ExecutionCount, s.max_elapsed_time AS MaxElapsedTime, ISNULL(s.total_elapsed_time / 1000 / NULLIF(s.execution_count, 0), 0) AS AvgElapsedTime 阅读全文
posted @ 2011-05-04 10:34
开始测试
阅读(504)
评论(0)
推荐(0)
浙公网安备 33010602011771号