EXECSYNC

(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:

The simplest explanation of this wait type is that there are parallel plans running. This is similar to a CXPACKET wait, but instead of being for exchange iterators, these are for building constructs that help queries (like bitmaps for star joins and spools). The parallel threads wait while the construct is built with a single thread, and all accrue EXECSYNC.

Do not just reduce the server MAXDOP to try to reduce or remove these! Please read the detailed explanations and advice in the links below.

(Books Online description: “Occurs during parallel queries while synchronizing in query processor in areas not related to the exchange iterator. Examples of such areas are bitmaps, large binary objects (LOBs), and the spool iterator. LOBs may frequently use this wait state.”)

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 191 in 2008 and 2008 R2, 197 in 2012, and 204 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. If you do not want parallelism, see the CXPACKET wait for more information.

This wait type is one that I usually filter out as a benign wait when doing wait statistics analysis.

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

  1. Waiting for parallel threads to finish while completing a parallel operation (in this case, as part of processing a SELECT … INTO operation)
  2. Waiting for parallel threads to finish while completing a parallel operation (in this case, as part of processing an internal query for parallel DBCC CHECKDB)

And other similar call stacks.

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

  1. SOS_Task::PostWait+9e
    EventInternal<SuspendQueueSLock>::Wait+2ca
    SOS_Task::WaitForDone+a0
    SubprocessMgr::AbortAndWaitForSubprocs+17e
    CQueryInstance::AbortSubprocsAndWait+9d
    CQueryInstance::AbortSubprocess+164
    CQueryInstance::ShutdownParallel+2e
    CQueryScan::DestroyQuery+72
    CXStmtQuery::ShutdownNormal+f3
    CXStmtQuery::ErsqExecuteQuery+cf7
    CXStmtDML::XretDMLExecute+31c
    CXStmtSelectInto::XretSelectIntoExecute+5fe
    CXStmtSelectInto::XretExecute+129
    CMsqlExecContext::ExecuteStmts<1,1>+427
    CMsqlExecContext::FExecute+a43
    CSQLSource::Execute+86c
    process_request+a57
    process_commands+4a3
    SOS_Task::Param::Execute+21e
    SOS_Scheduler::RunTask+ab
  2. SOS_Task::PostWait+9e
    EventInternal<SuspendQueueSLock>::Wait+2ca
    SOS_Task::WaitForDone+a0
    SubprocessMgr::AbortAndWaitForSubprocs+17e
    CQueryInstance::AbortSubprocsAndWait+9d
    CQueryInstance::AbortSubprocess+164
    CQueryInstance::ShutdownParallel+2e
    CQueryScan::DestroyQuery+72
    CXStmtQuery::ShutdownNormal+f3
    CXStmtQuery::ErsqExecuteQuery+cf7
    CXStmtSelect::XretExecute+2e7
    CMsqlExecContext::ExecuteStmts<1,1>+427
    CMsqlExecContext::FExecute+a43
    CSQLSource::Execute+86c
    CSQLSource::SeExecute+119
    ExecSql+4e2
    ExecSql+c6
    CExecSql::Execute+35
    CheckAggregateSingleInstance::Verify+1bf
    CheckTables::Verify+298
    CheckTables::Check+6c1