消耗排名前50查询SQL

select

q.objectid,q.number,q.encrypted,q.[text],*

from

( select top 50 qs.*

  from sys.dm_exec_query_stats qs

  order by qs.total_worker_time desc) as highest_cpu_queries

  cross apply sys.dm_exec_sql_text(plan_handle) as q

order by highest_cpu_queries.total_worker_time desc

Go
原文地址:https://www.cnblogs.com/ziranquliu/p/6376555.html