use DATABASE
go
SELECT s.object_id, s.cached_time, s.sql_handle, s.plan_handle, s.last_execution_time,
s.execution_count,
s.total_worker_time,
s.min_worker_time, s.max_worker_time, s.total_physical_reads, s.min_physical_reads, s.max_physical_reads, s.total_logical_reads, s.min_logical_reads,
s.max_logical_reads, s.total_logical_writes, s.min_logical_writes, s.max_logical_writes, s.total_elapsed_time, s.min_elapsed_time, s.max_elapsed_time
FROM sys.procedures AS p
INNER JOIN sys.dm_exec_procedure_stats
AS s ON s.object_id = p.object_id
WHERE p.name = 'STORED PROCEDURE NAME'
and s.database_id = DB_ID()
No comments:
Post a Comment