(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 access to a data file page in memory (usually an allocation bitmap page) so that it can update the page structure (UP = UPdate 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 not in an I/O request. The latch request is in Update mode.”)
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 51 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 PAGELATCH_EX wait type for more details.
Known occurrences in SQL Server (list number matches call stack list):
- Setting the ‘this page is allocated’ bit in the byte for a page in a PFS page (in this case, while allocating the page that an index page will split into during a page split from an insert)
- Setting the ‘this page has one or more ghost records’ bit in the byte for a page in a PFS page (in this case, as part of deleting a row from a nonclustered index on the sys.sysrowsets Storage Engine system table while dropping a rowset as part of a DROP TABLE)
- Clearing the ‘this page is allocated’ bit in the byte for a page in a PFS page (in this case, while doing a background deferred drop of a large allocation unit)
- Setting the ‘this extent is allocated’ bit for an extent in an IAM page (in this case, while allocating a page that will be the target of a page move during a data file shrink)
- Setting the ‘this extent has changed’ bit for an extent in a differential bitmap page (in this case, while allocating a page to store statistics being created by an UPDATE STATISTICS)
And many more similar stacks where allocation bitmap pages in memory are being updated.
Abbreviated call stacks (list number matches known occurrences list):
- SOS_Task::PostWait+9e
EventInternal::Wait+1fb
LatchBase::Suspend+633
LatchBase::AcquireInternal+415
TargetExtentMgr::AllocPageFromTargetExtent+5d3
AllocationReq::AllocateFromExistingExtents+9e1
AllocationReq::AllocatePages+15ba
AllocationReq::Allocate+f3
AllocateHoBtDataPage+5fd
IndexPageManager::AllocatePage+1b8
SplitPage+b48
IndexDataSetSession::InsertSmallRecord+1a1d
IndexDataSetSession::InsertRowInternal+2de1
DatasetSession::InsertRow+163
RowsetNewSS::InsertRow+26
CValRow::SetDataX+5b
sqlTsEs.dll!0x000007FEF1C31437
CQScanScalarInsertNew::GetRow+94
CQueryScan::GetRow+81
CXStmtQuery::ErsqExecuteQuery+36d
CXStmtDML::XretDMLExecute+31c
CXStmtDML::XretExecute+ad - SOS_Task::PostWait+9e
EventInternal::Wait+1fb
LatchBase::Suspend+633
LatchBase::AcquireInternal+415
BUF::AcquireLatch+78
BPool::Get+10f
PFSPageRef::Fix+b2
ChangeGhostPageState+e0
IndexPageRef::MarkGhost+1366
BTreeRow::DeleteRecord+1782
IndexDataSetSession::DeleteRow+296
RowsetNewSS::DeleteRows+4e
CMEDScan::DeleteNCRow+27a
CMEDScan::DeleteRow+4b
CMEDCatKatmaiIndex::DropRowset+55c
VisibleHoBt::DropHoBt+35d
SEDropRowsetInternal+79c
DDLAgent::SEDropRowsets+4b
CIndexDDL::DropRowset+c0
DropAllRowsetsForTable+173
DropObject+126 - SOS_Task::PostWait+9e
EventInternal::Wait+1fb
LatchBase::Suspend+633
LatchBase::AcquireInternal+415
BUF::AcquireLatch+78
BPool::Get+10f
PFSPageRef::Fix+b2
DeAllocateMixedPage+4ce
DeferredAllocUnitDrop::DeAllocateDataPagesInIAM+29a
DeferredAllocUnitDrop::DeAllocateFirstIAMAndItsExtents+1ea
DeferredAllocUnitDrop::ProcessOneIAM+91
DeferredAllocUnitDrop::Process+1a3
DeferredAllocUnitDrop::AllocUnitCleanupTask+76
PeriodicTimerTask::ProcessTskPkt+a
TaskReqPktTimer::ExecuteTask+63
OnDemandTaskContext::ProcessTskPkt+3e2
SystemTaskEntryPoint+426
OnDemandTaskContext::FuncEntryPoint+25
SOS_Task::Param::Execute+21e
SOS_Scheduler::RunTask+ab - SOS_Task::PostWait+9e
EventInternal::Wait+1fb
LatchBase::Suspend+633
LatchBase::AcquireInternal+415
ChangeExtStateInIAM+2f3
AllocationReq::AllocatePages+1ee4
AllocationReq::Allocate+f3
AllocateHoBtDataPage+5fd
IndexPageManager::AllocatePage+1b8
IndexPageManager::SwapPage+f8
SwapPageUnderSystemTransaction+442
IndexDataSetSession::MoveDataPageCommon+91f
IndexDataSetSession::MovePages+2c0
IndexDataSetSession::ShrinkInternal+f7
DatasetSession::Shrink+b2
UtilDbccMoveBtreePages+2ca
UtilDbccMovePages+1cbd
UtilDbccProcessPagesInShrink+62d
UtilDbccShrinkDataFiles+18c8
UtilDbccShrinkDataFiles+76e
UtilDbccShrinkDatabase+8fc
DbccShrink+49e - SOS_Task::PostWait+9e
EventInternal::Wait+1fb
LatchBase::Suspend+633
LatchBase::AcquireInternal+415
BUF::AcquireLatch+78
PageRef::SetDiffMapChangeBit+11a
PageRef::FormatInternal+125
AllocateHoBtDataPage+8c4
IndexPageManager::AllocatePage+1b8
SplitPage+b48
BTreeRow::UpdateRecord+1f41
IndexDataSetSession::SetDataInternal+9a03
DatasetSession::SetData+16d
RowsetNewSS::SetData+6a
CMEDScanBase::FUpdateSingleRow+be
CMEDScan::FUpdateRow+5ae
CMEDCatYukonObject::SetStatsBlob+47a
CMEDProxyStats::SetBlob+236
CStatMan::PersistBlob+1bf
CStatMan::PersistBlob+50
CStatsUtil::PersistQPStatsInCatalogs+87f
CStatsUtil::FUpdateQPStatsHelper+f7e