(Republishing, or using this info in a commercial product/website, is prohibited without permission. All other uses are permitted. If in doubt, please ask.)
This wait type is when a thread is waiting for the read of a data file page from disk to complete, and the thread is going to read (not modify) the page structure once it is in memory (SH = SHare mode). The Latches Whitepaper in the sidebar on the right has a description of all latch modes and their compatibility with other latch modes.
(Books Online description: “Occurs when a task is waiting on a latch for a buffer that is in an I/O request. The latch request is in Shared mode. Long waits may indicate problems with the disk subsystem.”)
Questions/comments on this wait type? Click here to send Paul an email, especially if you have any information to add to this topic.
Added in SQL Server version:
Removed in SQL Server version:
Extended Events wait_type value:
The map_key value in sys.dm_xe_map_values is 66 in all versions through 2014 RTM. After 2014 RTM, you must check the DMV to get the latest value as some map_key values have changed in later builds.
The knee-jerk reaction to this wait type is that it must be the I/O subsystem that has a problem, and even the Books Online description mentions this. It’s true that long waits for I/Os indicate the I/O subsystem is overloaded, but it’s more likely that the problem is in SQL Server than with the I/O subsystem. You need to think about *why* SQL Server is doing so many reads.
I wrote a long article on troubleshooting PAGEIOLATCH_XX waits on sqlperformance.com – basically identifying the query that’s doing the reads and then figuring out which table is being read from and why that data isn’t already in memory. You can get the workflow for identifying a table from a page resource (from sys.dm_os_waiting_tasks) in this blog post.
Known occurrences in SQL Server (list number matches call stack list):
- Reading a heap data page (in this case, during a scan)
- Reading an index leaf-level page (in this case, during a scan)
- Reading an IAM page (in this case, to get the next extent as part of an unordered scan of an index)
- Reading a text page (in this case, as part of retrieving table statistics for the Query Optimizer during query compilation)
And many, many more similar stacks to do with reading data file pages from disk.
Abbreviated call stacks (list number matches known occurrences list):