Monitoring current query execution statistics

In order to perform query tuning on production database server, you need to identify those resource-consuming queries and the source from where they are coming. For this, you need to monitor the incoming query requests and examine their execution time, number of read/write operations, and so on.

SQL Server has dedicated a separate category of DMVs and DMFs to query execution statistics. These DMVs and DMFs provide a wide range of statistics on query execution requests. The names of these execution-related DMVs and DMFs are generally prefixed by sys.dm_exec_. By examining the results returned by these DMVs and DMFs, you can find out long-running and resource-consuming queries, and pick them up for query ...

Get Microsoft SQL Server 2012 Performance Tuning Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.