Correlating IO Wait with Queries
Have you ever looked at sys.dm_os_virtual_file_stats and saw horrible latency for your database files? Generally speaking, you want to see latency below 20 ms on your database files. much above that and there are some problems somewhere that need some tuning.
But, how do you know what queries are causing your issue? What’s causing those IO waits?
How to Find Queries Associated with Pending IO Requests
I responded to a question on SQLServerCentral.com about performance that is related to these types of scenarios. The poster wanted to know if there was a way to correlate pending io requests with the queries that were experiencing the waits using the DMV sys.dm_io_pending_requests.