SP 튜닝시 현재 Plan 으로 얼마나 호출이 됐나 확인하는 방법 찾기.
SELECT TOP (10)
OBJECT_NAME(b.objectid, b.dbid) AS N'SP_NAME'
, a.plan_generation_num
, a.creation_time
, a.last_execution_time
, a.execution_count
, a.total_physical_reads
, a.total_logical_reads
, a.total_logical_writes
, a.min_logical_reads
, a.max_logical_reads
, a.total_rows
, a.min_rows
, a.max_rows
FROM sys.dm_exec_query_stats a
CROSS APPLY sys.dm_exec_sql_text (A.sql_handle) AS B
WHERE OBJECT_NAME(b.objectid, b.dbid) = 'SP_NAME'