(Republishing, or using this info in a commercial product/website, is prohibited without permission. All other uses are permitted. If in doubt, please ask.)
Description:
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 modify the page structure once it is in memory (EX = EXclusive 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 Exclusive 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:
Pre-2005/2005
Removed in SQL Server version:
N/A
Extended Events wait_type value:
The map_key value in sys.dm_xe_map_values is 68 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.
Other information:
See the PAGEIOLATCH_SH wait type for more details.
Known occurrences in SQL Server (list number matches call stack list):
- Reading a page from disk so that ghost records can be removed from it
- Reading a page from disk so a row can be inserted on it (in this case, a row being inserted into a system table as part of creating a table)
- Reading a file header page from disk before changing it (in this case, as part of growing a file to allow a new extent to be allocated during a bulk load of data into a heap)
And many more similar stacks where rows are being inserted, updated, or deleted.
Abbreviated call stacks (list number matches known occurrences list):
- SOS_Task::PostWait+90
EventInternal::Wait+1f9
LatchBase::Suspend+633
LatchBase::AcquireInternal+415
BUF::AcquireLatch+78
GhostExorciser::GetNextGhostPageInPFS+104
GhostExorciser::GetNextGhostedPage+7a
TaskGhostCleanup::ProcessTskPkt+51d
GhostRecordCleanupTask+10b
CGhostCleanupTask::ProcessTskPkt+9
TaskReqPktTimer::ExecuteTask+63
OnDemandTaskContext::ProcessTskPkt+285
SystemTaskEntryPoint+431
OnDemandTaskContext::FuncEntryPoint+25
SOS_Task::Param::Execute+21e
SOS_Scheduler::RunTask+a8 - SOS_Task::PostWait+90
EventInternal::Wait+1f9
LatchBase::Suspend+633
LatchBase::AcquireInternal+415
BUF::AcquireLatch+78
BPool::Get+ea
IndexPageManager::GetPageWithKey+1206
IndexDataSetSession::LocatePageForInsert+202
IndexDataSetSession::InsertSmallRecord+dac
IndexDataSetSession::InsertRowInternal+2d11
DatasetSession::InsertRow+163
RowsetNewSS::InsertRow+26
CMEDScanBase::FInsertSingle+9c
CMEDScan::FInsertRow+462
ECatBitsYukon::FInsertObjRow+1f6
CMEDCatYukonObject::FPersistObjectInCatalog+5bb
CMEDCatalogObject::FPersistObject+132
CMEDProxySchema::CreateObject+167
CTableCreate::LCreateImpl+c86
CStmtCreateTable::XretCreateTableExecute+1c0
CXStmtCreateTableDDL::XretExecute+3b
CMsqlExecContext::ExecuteStmts<1,1>+400 - SOS_Task::PostWait+90
EventInternal::Wait+1f9
LatchBase::Suspend+633
LatchBase::AcquireInternal+415
BUF::AcquireLatch+78
BPool::Get+ea
GlobalFileHeader::SetFileProperties+1e3
FileMgr::InternalGrowFile+c3f
FGCB::GrowAFile+8a6
MakeSpaceInFileGroup+4a
AllocationReq::AllocatePages+2514
AllocationReq::Allocate+f3
ExtentAllocator::PreAllocateExtents+1c8
ExtentAllocatorSingleAlloc::PreAllocate+72
ExtentAllocatorSingleAlloc::AllocateExtents+25c
CBulkAllocator::AllocateExtent+24d
CBulkAllocator::AllocatePageId+bc
CBulkAllocator::AllocateLinkedAndFormattedLeafPage+c2
CHeapBuild::AllocateNextHeapPage+1f
CHeapBuild::InsertRow+14f
RowsetBulk::InsertRow+2d4e
CValRow::SetDataX+5b