SQL Server Virtual File Stats
As anyone knows who's worked with SQL Server for more than about 10 minutes - she's I/O intensive - especially when under high memory pressure. So... exactly which one of your databases is reading and writing more then the others? Does your database read more than it writes? If so, by how much? How many IOPS has it encountered and how large were those logical IOPS?
Well, let me tell you - the answer is a lot easier then you might think. This simple script will spit out all of that crucial information about each database file (both data and log). Check it out for yourself!
INNER JOIN sys.master_files mf
ON mf.database_id = vfs.DbId
AND mf.file_id = vfs.FileId
Is this code snippet, product or advice warrantied against ill-effect and/or technical malaise? No. No it's not! Not expressed - Not implied - not at all.