reads and writes per second | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

reads and writes per second

Hi folks,
How to calculate number of reads/sec and writes/sec for a particular database? Are there any system stored procedures to view these values? any easy method to know these for databases and also for sql server? Thanks in advance,

select DB_NAME(database_id), [file_id],io_stall_read_ms
,num_of_reads,cast(io_stall_read_ms/(1.0+num_of_reads) as numeric(10,1)) as ‘avg_read_stall_ms’
,io_stall_write_ms,num_of_writes,cast(io_stall_write_ms/(1.0+num_of_writes) as numeric(10,1)) as ‘avg_write_stall_ms’,io_stall_read_ms + io_stall_write_ms as io_stalls,num_of_reads + num_of_writes as total_io,cast((io_stall_read_ms+io_stall_write_ms)/(1.0+num_of_reads + num_of_writes) as numeric(10,1)) as ‘avg_io_stall_ms’from sys.dm_io_virtual_file_stats(null,null)order by avg_io_stall_ms desc
MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

You can also take help of DMV:<br /><pre id="code"><font face="courier" size="2" id="code">SELECT text <br />FROM sys.dm_exec_sql_text (&lt;sql-handle&gt;<br /><br />SELECT *<br />FROM sys.dm_exec_query_plan (&lt<img src=’/community/emoticons/emotion-4.gif’ alt=’;p’ />lan_handle&gt;</font id="code"></pre id="code"><br /><br /><b>Satya SKJ</b><br />Microsoft SQL Server MVP<br />Writer, Contributing Editor & Moderator<br /<a target="_blank" href=http://www.SQL-Server-Performance.Com>http://www.SQL-Server-Performance.Com</a><br /><center><font color="teal"><font size="1">This posting is provided AS IS with no rights for the sake of <i>knowledge sharing. <hr noshade size="1">Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.</i></font id="size1"></font id="teal"></center>
]]>