Is there a way to monitor virtual filestats data with Extended Events, instead of doing (select * from sys.dm_io_virtual_file_stats) in SSMS?
1 Answer
Extended Events is not a replacement for DMVs; they are a replacement for SQL Trace. Periodically querying the DMV is going to be less expensive than using an Extended Events Session.
The SQL Server storage engine always updates the file stats, whether you choose to query them or not.
Adding an Extended Event Session that captures each individual IO would introduce additional overhead for each read and write, and should only be done for debugging or troubleshooting, not performance monitoring.