DB

[ms-sql]저장 프로시저 호출 통계 (stored procedure statistics) 보는 스크립트

저장 프로시저 호출 통계

SELECT TOP 30 d.object_id
, d.database_id
, OBJECT_NAME(object_id, database_id) ‘proc name’
, d.cached_time, d.last_execution_time, d.total_elapsed_time
, d.total_elapsed_time/d.execution_count AS [avg_elapsed_time]
, d.last_elapsed_time, d.execution_count
FROM sys.dm_exec_procedure_stats AS d
ORDER BY [total_worker_time] DESC;

Leave a Reply

error: Content is protected !!