SELECT TOP 30 DB_NAME(dbid) AS DatabaseName
,OBJECT_NAME(ObjectID) AS ObjectName
,der.creation_time
,der.Last_execution_time
,total_logical_reads , total_logical_writes, execution_count
,Text
FROM sys.dm_exec_query_stats as der
CROSS APPLY sys.dm_exec_sql_text(der.sql_handle) as dest
WHERE DB_NAME(dbid) = ''
ORDER BY total_logical_reads DESC
|