concept most cpu in category sql

This is an excerpt from Manning's book SQL Server DMVs in Action: Better Queries with Dynamic Management Views.
When a query isn’t waiting or being blocked, it’s typically using the CPU. In the next section I’ll identify which queries are using the most CPU and suggest why this might reflect various performance problems, along with some possible solutions.
If you can identify the queries that use the most CPU, you can inspect their cached plans for indications of why they’re so CPU intensive, with a view to improving their performance. It may be because they’re doing a lot of calculations, and perhaps this work could be offloaded to a CLR function (see chapter 7 for more information about this). Running the SQL script given in the next listing will identify the top 20 queries
that use the most CPU, as ordered by Total CPU time (s)
.
In the listing, you can see that one DMV and two DMFs are involved in identifying the queries that use the most CPU. A brief description of each is shown in table 4.6.
Table 4.6. DMV/DMFs to identify the queries that use the most CPU
DMV/DMF
Description
sys.dm_exec_query_stats Contains aggregated performance statistics for cached plans sys.dm_exec_sql_text DMF that returns the SQL text identified by a given sql_handle or plan_handle sys.dm_exec_query_plan DMF that returns the cached plan, in XML format, identified by a given plan_handle The joining of the DMV and DMFs provides us with enough information to identify the queries that use the most CPU, across all the databases on the server. The DMV sys.dm_exec_query_stats is joined to the DMFs via the CROSS APPLY keyword. The query’s sql_handle is passed to the DMF sys.dm_exec_sql_text to retrieve the text of the SQL query. Similarly, the query’s plan_handle is passed to the DMF sys.dm_exec_query_plan to retrieve the cached plan of the query. We use a common pattern to extract the Individual Query, which the timings relate to, from the Parent Query.
that use the most CPU, as ordered by Total CPU time (s)
.