SQL Server IO Stall Statistics

-- Read IO Stalls Statistics
SELECT @@VERSION
GO
SELECT type, SUM(io_stall_read_ms) AS io_stall_read,
SUM(io_stall_write_ms) AS io_stall_write,
SUM(num_of_reads) AS num_of_reads,
SUM(num_of_writes) AS num_of_writes
FROM sys.dm_io_virtual_file_stats(NULL, NULL) fs
JOIN sys.database_files df
ON fs.file_id = df.file_id
WHERE database_id = DB_ID() GROUP BY df.type

 

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *