ACCESS_METHODS_HOBT_COUNT

(Republishing, or using this info in a commercial product/website, is prohibited without permission. All other uses are permitted. If in doubt, please ask.)

(Back to main page…)

Description:

This latch class is when a thread is waiting for access to the data structure holding page and row count deltas for a HoBt (Heap-or-B-tree), which will eventually be flushed to the Storage Engine metadata tables.

(Books Online description: “Used to synchronize access to a HoBt page and row counters.”)

Questions/comments on this latch class? 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 latch_class value:

Maps to the HOBT_COUNT map_value in sys.dm_xe_map_values.

The map_key value in sys.dm_xe_map_values is 10 in 2008 and 2008 R2, and 4 in 2012 and 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:

It’s not common for this latch class to be a source of contention, but if it is, it usually indicates huge numbers of small, concurrent DML operations on a single table.

See the LATCH_EX wait type for more information about latches in general and how to troubleshoot them.

Known occurrences in SQL Server (list number matches call stack list):

  1. Making note of an increase in the number of records for a HoBt (in this case, while automatically generating statistics for a table or index, and the new row is being inserted into a system catalog – likely sys.sysidxstats)
  2. Making note of a decrease in the number of records for a HoBt (in this case, while deleting a table, and the row being deleted is in a system table holding the column metadata for the table – likely sys.syscolpars)

And many, many more similar call stacks.

Abbreviated call stacks (list number matches known occurrences list):

  1. XeSqlPkg::latch_suspend_end::Publish+138
    LatchBase::Suspend+16b8
    LatchBase::AcquireInternal+415
    CountDeltaContext::InitAndLatch+91
    InsertRecordOnPage+54a
    IndexDataSetSession::InsertSmallRecord+10ca
    IndexDataSetSession::InsertRowInternal+2de1
    DatasetSession::InsertRow+163
    RowsetNewSS::InsertRow+26
    CMEDScanBase::FInsertSingle+9c
    CMEDScan::FInsertRow+297
    ECatBitsYukon::FInsertValRow+13f
    CMEDCatYukonObject::FPersistStats+26a
    CMEDProxyRelation::CreateStats+667
    CStatsUtil::CreateQPStats+4e2
    CStatsDef::CreateStats+6f9
    CStmtCreateStats::XretExecute+91b
    CMsqlExecContext::ExecuteStmts<1,1>+427
    CMsqlExecContext::FExecute+a33
    CSQLSource::Execute+86c
    CSQLSource::SeExecute+119
    CExecAutoCreateStats::FExecute+1ee
    COptContext::FCreateAutoStat+560
  2. XeSqlPkg::latch_suspend_end::Publish+138
    LatchBase::Suspend+16b8
    LatchBase::AcquireInternal+415
    BTreeRow::DeleteRecord+1718
    IndexDataSetSession::DeleteRow+296
    RowsetNewSS::DeleteRows+4e
    CMEDScan::DeleteRow+82
    ECatBitsYukon::DeleteAndLockColumnParameter+185
    CMEDCatYukonObject::DropObject+1649
    CMEDProxyObject::DropInternal+306
    CMEDProxyObject::Drop+8f
    DropObject+4ca
    CallDropObject+20a3
    CStmtDropObject::XretDropExecute+d3
    CMsqlExecContext::ExecuteStmts<1,1>+427
    CMsqlExecContext::FExecute+a33
    CSQLSource::Execute+86c