GROUP BY left(f.physical_name, 1),DATEADD(MS,sample_ms * -1, GETDATE()) įor Calculating Disk Latency for your different database drives SELECT LEFT(physical_name, 1) AS drive, ON f.database_id=v.database_id and f.file_id=v.file_id INNER JOIN sys.dm_io_virtual_file_stats(NULL, NULL) v SUM(v.size_on_disk_bytes) AS total_size_on_disk_bytes SUM(v.num_of_bytes_read) AS total_num_of_bytes_read, SUM(v.num_of_reads) AS total_num_of_reads, SUM(v.num_of_bytes_written) AS total_num_of_bytes_written, SUM(v.num_of_writes) AS total_num_of_writes, GROUP BY name ORDER BY 'Number of Read' DESC įor Displaying I/O statistics by physical drive letter : SELECT left(f.physical_name, 1) AS DriveLetter,ĭATEADD(MS,sample_ms * -1, GETDATE()) AS , ,SUM(num_of_writes) AS 'Number of Writes'įROM sys.dm_io_virtual_file_stats(NULL, NULL) I Irerspective of any isolation level, you can identify total I/O for each database SELECT name AS 'Database Name' You can use this script to find out read/writes by database.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |