Press "Enter" to skip to content

Finding High-CPU Queries

Dennes Torres has a script to check CPU-intense queries:

Fortunately we can find queries with high CPU time using sys.dm_exec_query_stats DMV. This DMV, created in SQL Server 2008, keeps performance statistics for cached query plans, allowing us to find the queries and query plans that are most harming our system.

Glenn Berry’s fantastic set of diagnostic queries also includes a couple for finding CPU consumers.