码迷,mamicode.com
首页 > 数据库 > 详细

SQLServer查询逻辑读最高的语句

时间:2015-03-04 14:19:34      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:

select top 25
p.name as [SP Name],
deps.total_logical_reads as [TotalLogicalReads],
deps.total_logical_reads / deps.execution_count as [AvgLogicalReads],
deps.execution_count,
ISNULL(deps.execution_count/DATEDIFF(Second,deps.cached_time,Getdate()),0) as [Calls/Second],
deps.total_elapsed_time,
deps.total_elapsed_time / deps.execution_count as [avg_elapsed_time] ,
deps.cached_time
from sys.procedures as p
inner join sys.dm_exec_procedure_stats as deps on p.[object_id] = deps.[object_id]
where deps.database_id = DB_ID()
order by deps.total_logical_reads desc

SQLServer查询逻辑读最高的语句

标签:

原文地址:http://www.cnblogs.com/yeye518/p/4312974.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!