Skip to content

Instantly share code, notes, and snippets.

@shiranGinige
Created November 20, 2015 01:33
Show Gist options
  • Save shiranGinige/30df18b3fd31b4cfa0ef to your computer and use it in GitHub Desktop.
Save shiranGinige/30df18b3fd31b4cfa0ef to your computer and use it in GitHub Desktop.
select top 25
(total_logical_reads/execution_count) as avg_logical_reads,
(total_logical_writes/execution_count) as avg_logical_writes,
(total_physical_reads/execution_count) as avg_phys_reads,
Execution_count,
statement_start_offset as stmt_start_offset,
sql_handle,
plan_handle
from sys.dm_exec_query_stats
order by
(total_logical_reads + total_logical_writes) Desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment