Retorna as 10 consultas com maior consumo de CPU:
SELECT TOP 10 total_worker_time/execution_count AS [Avg CPU Time],
Plan_handle, query_plan
FROM sys.dm_exec_query_stats AS qs
CROSS APPLY sys.dm_exec_text_query_plan(qs.plan_handle, 0, -1)
ORDER BY total_worker_time/execution_count DESC;
[]s
Nenhum comentário:
Postar um comentário