select top 50
ExecTime=CP.ExecutionTime, ExecCnt=CP.ExecutionCount, TimePerExec=CP.ExecutionTime/CP.ExecutionCount,
CP.CPUTime, PhysReads=CP.PhysicalReads, LogReads=CP.LogicalReads, PhysWrites=CP.PhysicalWrites,
DBName=case when ObjectName like "*ss[0-9][0-9]%"
then substring(CS.DBName,1,16)
else substring(CP.DBName,1,16)
end,
CachedProcOrStatement=case when CP.ObjectName like "*ss[0-9][0-9]%"
then substring(show_cached_text(CP.ObjectID),1,110)
else substring(CP.ObjectName,1,110)
end
from monCachedProcedures CP
left outer join monCachedStatement CS on CP.ObjectID=CS.SSQLID
order by CP.ExecutionTime desc ExecTime ExecCnt TimePerExec CPUTime PhysReads LogReads PhysWrites DBName CachedProcOrStatement
----------- ----------- ----------- ----------- ----------- ----------- ----------- ---------------- -----------------------------------------------------------------------------------------
1040412 928495 1 9771 0 0 6159 mydb1 insert into ThisTable (f1, f2) values (@@@V0_INT, @@@V1_INT)(@@@V0_INT INT, @@@V1_INT INT)
850124 180026 4 10220 0 0 0 mydb2 insert into ThatTable ...snip...
645990 121866 5 36531 0 0 16248 mydb3 insert into WhatTable ...snip...You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 27 | |
| 24 | |
| 15 | |
| 13 | |
| 13 | |
| 12 | |
| 12 | |
| 12 | |
| 11 | |
| 10 |