DBCC_OBJECT_METADATA

(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 ExpressionEvaluator object that the Query Processor provides to DBCC consistency checks so that the thread can verify the stored value of a computed column is correct.

(Books Online description: “Internal use only.”)

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:

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

This latch is a major bottleneck for DBCC consistency checks when indexes on computed columns exist, as the ExpressionEvaluator latch must be acquired for each row of an index on a computed column, by any thread checking one of these indexes, and can only be acquired in EX mode. (Just to be clear, although I was responsible for DBCC for SQL Server 2005, the ExpressionEvaluator functionality and it’s EX-latch limitation wasn’t written by me 🙂 The only solution is to disable those indexes before running the consistency checks, and as far as I know, this bottleneck will not be addressed by Microsoft. You can read more about this issue in this blog post.

Also 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. Verifying the value of a persisted computed column from a data page
  2. Calculating the value of a computed column as part of the nonclustered index cross-checks (see the blog post link above for details)

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

  1. XeSqlPkg::latch_suspend_end::Publish+138
    LatchBase::Suspend+16b8
    LatchBase::AcquireInternal+415
    CheckTables::VerifyColumnValueComputed+d4
    CheckTables::VerifyColumnValueLong+12c
    CheckTables::InstantiateAndCheckDataRecordLong+158
    CheckTables::InstantiateAndCheckDataRecord+e4
    CheckTables::ProcessDataPage+165
    CheckTables::ProcessPage+799
    CheckTables::ProcessNextData+34f
    CheckAggregateSingleInstance::GetNextFact+28e
    CTRowsetInstance::FGetNextRow+3c
    CQScanRmtScanNew::GetRowHelper+3b5
    CQScanXProducerNew::GetRowHelper+366
    CQScanXProducerNew::GetRow+15
    FnProducerOpen+57
    FnProducerThread+8c3
  2. XeSqlPkg::latch_suspend_end::Publish+138
    LatchBase::Suspend+16b8
    LatchBase::AcquireInternal+415
    CheckCrossRowset::ProcessDataRecordInternal+518
    CheckCrossRowset::ProcessDataRecord+1d3
    CheckTables::ProcessDataPage+25b
    CheckTables::ProcessPage+799
    CheckTables::ProcessNextData+34f
    CheckAggregateSingleInstance::GetNextFact+28e
    CTRowsetInstance::FGetNextRow+3c
    CQScanRmtScanNew::GetRowHelper+3b5
    CQScanXProducerNew::GetRowHelper+366
    CQScanXProducerNew::GetRow+15
    FnProducerOpen+57
    FnProducerThread+8c3