(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 running an online index/partition switch operation and is blocked by other operations while waiting for the final Schema Modification (also called Schema Modify) lock. In this case, the WAIT_AT_LOW_PRIORITY option has been specified, the MAX_DURATION time has expired, and the blocking operations are being rolled back.
You can read more about the WAIT_AT_LOW_PRIORITY option here.
(Books Online description: “Occurs when a task is waiting to acquire a Schema Modify lock with Abort Blockers. (Related to the low priority wait option of ALTER TABLE and ALTER INDEX.)”)
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:
2014
Removed in SQL Server version:
N/A
Extended Events wait_type value:
The map_key value in sys.dm_xe_map_values is 955 in 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:
I have not seen this wait type be a noticeable contention point.
The duration of each wait of this type will be how long it takes for all operations that are blocking the online index/partition switch operation to roll back (following immediately from an LCK_M_SCH_M_LOW_PRIORITY wait from while the online index/partition switch operation was waiting at low priority).
Known occurrences in SQL Server (list number matches call stack list):
- Waiting for the Schema Modification lock during an online index operation (same stack as for LCK_M_SCH_M_LOW_PRIORITY except for a different location in the MDL::LockObjectLocal function)
- Waiting for the Schema Modification lock during a partition switch operation and the blocking operations are rolling back (same stack as for LCK_M_SCH_M_LOW_PRIORITY except for a different location in the MDL::LockObjectLocal function)
Abbreviated call stacks (list number matches known occurrences list):
- EventInternal<SuspendQueueSLock>::Wait+0x1fb
LockOwner::Sleep+0x485
lck_lockInternal+0x10ed
MDL::LockObjectLocal+0xdbe
CMEDCacheEntryFactory::AcquireLock+0x61
CMEDCatalogObject::GetCachedObjectById+0xe2
CMEDProxyDatabase::GetObjectByObjectId+0x91
CIndexDDL::CleanupIndices+0xcb
CIndexDDL::Rebuild+0xa25
RegularIndexRebuildHelper+0x35e
CISRegularIndex::Rebuild+0x8f
CStmtAlterIndex::XretExecute+0x16e3
CMsqlExecContext::ExecuteStmts<1,1>+0x427
CMsqlExecContext::FExecute+0xa43
CSQLSource::Execute+0x86c
process_request+0xa57
process_commands+0x4a3
SOS_Task::Param::Execute+0x21e
SOS_Scheduler::RunTask+0xab - SOS_Task::PostWait+0x9e
EventInternal<SuspendQueueSLock>::Wait+0x1fb
LockOwner::Sleep+0x485
lck_lockInternal+0x10ed
MDL::LockObjectLocal+0xdbe
CMEDCacheEntryFactory::AcquireLock+0x61
CMEDCatalogObject::GetCachedObjectById+0xe2
CMEDProxyDatabase::GetObjectByObjectId+0x91
CStmtAlterTable::XretExecute+0xb89
CMsqlExecContext::ExecuteStmts<1,1>+0x427
CMsqlExecContext::FExecute+0xa43
CSQLSource::Execute+0x86c
process_request+0xa57
process_commands+0x4a3
SOS_Task::Param::Execute+0x21e
SOS_Scheduler::RunTask+0xab