Solutions > AppInsight Applications > Understanding AppInsight for SQL > Top 10 Most Expensive Queries by CPU Time

Top 10 Most Expensive Queries by CPU Time

This resource displays the top 10 most expensive queries sorted by the length of time the CPU spent processing the listed query.

When viewing this resource from the Summary tab on the Application Details page, queries are listed for the entire SQL Server instance. Conversely, when this same resource appears on the Database Details view, queries are only listed for that specific database.

The data can be sorted by clicking the headers of each column. Additionally, this resource can optionally show Top Queries by I/O by clicking Edit in this resource and making the necessary adjustments.

The resource is filtered based on the settings found on the Queries tab in Details view in the Most Expensive Queries resource.

  • Query Text: The text shown is a preview of the full query. To view an entire query in the list, click [+] next to the query listed to expand and view the query.
    Note: Clicking any listed query takes you to the Most Expensive Queries resource on the Queries tab, providing greater detail about the query.
  • CPU Time: Display the time, in milliseconds, the listed query took to complete.
  • Database: Displays the database with which the listed query is associated. The icon in this column shows the current state of the listed database.

The performance counter, Top Expensive Queries, is used to provide metrics for this resource and cannot be edited.