Solutions > AppInsight Applications > Understanding AppInsight for SQL > Most Expensive Queries

Most Expensive Queries

This resource provides detailed insight into the most expensive queries running on your SQL database. Queries for this view can be filtered by Time, Host, Database, and Login using the filter drop down menus at the top of the window.

The filters used here are also be applied to the Top 10 Most Expensive Queries by CPU Time resource found on the Summary tab in the Details view.

To view an entire query in the list, hover the mouse over a query, or click [+] next to the query listed to expand and view the query.

The data can be sorted by clicking the headers of each column.

This resource remains empty when polling of queries is disabled.

  • 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.
  • SPID: Server Process ID of the listed query.
  • Plan Count: Displays the number of cached query plans for the listed query. A large number might indicate a need for explicit query parameterization.
  • Executions:  Displays the number of times the listed query was executed.
  • CPU Time: Displays the amount of time, in milliseconds, that the listed query took to complete.
  • Phys. Read: This field returns the number of physical reads. Physical reads are reads that require reading directly from disk. Physical reads are substantially slower than reading from the cache or from RAM.
  • Logical Reads: Displays the number of times data was read from the cache.
  • Logical Writes: Displays the number of times data was written to the cache.
  • Average Duration: This displays the length of time it took, in milliseconds, to execute the listed query averaged by the number of executions.
  • Bytes Transferred: Number of bytes transferred during the query.
  • Login: Displays the current login information for the listed database.
  • Host: Displays the host for the listed database.
  • Database: Displays the current name for the listed database. Clicking any database in the list will take you to the Database Details page.