ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • MSSQL CPU 사용률 높은 쿼리 찾아내는 쿼리
    컴퓨터&모바일/MSSQL 2019. 8. 1. 10:06

    SELECT

        TOP 50

        qs.creation_time, qs.execution_count, qs.total_worker_time astotal_cpu_time,

        qs.max_worker_time as max_cpu_time,    qs.total_elapsed_time,qs.max_elapsed_time,

        qs.total_logical_reads, qs.max_logical_reads, qs.total_physical_reads,

        qs.max_physical_reads, t.[text], qp.query_plan, t.dbid, t.objectid,

        t.encrypted, qs.plan_handle, qs.plan_generation_num

    FROM sys.dm_exec_query_stats qs

        CROSS APPLY sys.dm_exec_sql_text(plan_handle) AS t

        CROSS APPLY sys.dm_exec_query_plan(plan_handle) AS qp

    ORDER BY qs.total_worker_time DESC

    '컴퓨터&모바일 > MSSQL' 카테고리의 다른 글

    SQL 18456 오류  (0) 2015.04.01
    mssql 로그오류 확인  (0) 2015.04.01
    index 생성 조회 삭제  (0) 2014.12.21

    댓글

Designed by Tistory.