2022. 3. 15. 16:24
SQL SERVER
튜닝대상 선정을 위한 SQL 실행횟수 확인
SELECT s.totalexecutioncount,
DB_NAME(t.dbid) daname,
t.text,
s.TotalExecutionCount,
s.TotalElapsedTime,
s.TotalLogicalReads,
s.TotalPhysicalReads
FROM (SELECT deqs.plan_handle,
SUM(deqs.execution_count) AS TotalExecutionCount,
SUM(deqs.total_elapsed_time) AS TotalElapsedTime,
SUM(deqs.total_logical_reads) AS TotalLogicalReads,
SUM(deqs.total_physical_reads) AS TotalPhysicalReads
FROM sys.dm_exec_query_stats AS deqs
GROUP BY deqs.plan_handle
) AS s
CROSS APPLY sys.dm_exec_sql_text(s.plan_handle) AS t
ORDER BY s.TotalLogicalReads DESC ;
'SQL SERVER' 카테고리의 다른 글
synonym의 base object 조회 (0) | 2022.12.15 |
---|---|
전체Table Size 확인 (0) | 2022.11.08 |
DB 이관시 설정상태 체크, 변경 (0) | 2022.02.07 |
Lock Or Expired된 계정 찾기 (0) | 2021.11.25 |
Examine IO subsystem latencies IN SQL SERVER (0) | 2021.11.24 |