(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:
The simplest explanation of this wait type is that there are parallel plans running. This wait type was added in Azure SQL Database and Azure SQL Managed Instance and is now in SQL Server 2022. This, along with CXSYNC_CONSUMER, were split out from CXPACKET in a bid to make investigating parallel plan performance issues easier.
I do not have any experience with this wait yet.
Do not just reduce the server MAXDOP to try to reduce or remove these! See CXPACKET for more information.
(Books Online description: “Occurs with parallel query plans when waiting to open, close, and synchronize Exchange Iterator ports between producer and consumer threads. For example, if a query plan has a long sort operation, CXSYNC_PORT waits may be higher because the sort must complete before the Exchange Iterator port can be synchronized.”)
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:
Azure SQL Database, Azure SQL Managed Instance, SQL Server 2022.
Removed in SQL Server version:
N/A
Extended Events wait_type value:
TBD
Other information:
TBD
Known occurrences in SQL Server (list number matches call stack list):
- Exchanging information during a sort operation
- Exchanging information as part of a stream aggregate during a statistics update
Abbreviated call stacks (list number matches known occurrences list):
- SOS_Task::PostWait
WaitableBase::Wait
SOS_WaitableAddress::WaitAllowPrematureWakeup
XchngWait<XPortSLock>
CXPort::Open
CQScanExchangeNew::Open
CQScanNew::OpenHelper
CQScanNew::OpenHelper
CQScanSortNew::BuildSortTable
CQScanSortNew::OpenHelper
CQScanNew::OpenHelper
CQScanStreamAggregateNew::Open
CQScanNew::OpenHelper
CQScanXProducerNew::Open
FnProducerOpen
FnProducerThread
SubprocEntrypoint
SOS_Task::Param::Execute
SOS_Scheduler::RunTask - SOS_Task::PostWait
WaitableBase::Wait
SOS_WaitableAddress::WaitAllowPrematureWakeup
XchngWait<XPortSLock>
CXPort::Open
CQScanExchangeNew::Open
CQScanNew::OpenHelper
CQScanStreamAggregateNew::Open
CQueryScan::StartupQuery
CXStmtQuery::SetupQueryScanAndExpression
CXStmtQuery::InitForExecute
CXStmtQuery::ErsqExecuteQuery
CXStmtSelect::XretExecute
CExecStmtLoopVars::ExecuteXStmtAndSetXretReturn
CMsqlExecContext::ExecuteStmts<1,1>
CMsqlExecContext::FExecute
CSQLSource::Execute
CStatsUtil::ExecInternalStatsQuery
CStatsUtil::PCStatManMaxdiffHistogram
CStatsUtil::PersistQPStatsInCatalogs
CStatsUtil::FUpdateQPStatsHelper
CQPJobStatsUpdate::Invoke
CQPJob::FDoQPJob
CQPOnDemandTask::ExecuteQPJob
PeriodicTimerTask::ProcessTskPkt
TaskReqPktTimer::ExecuteTask
OnDemandTaskContext::ProcessTskPkt
SystemTaskEntryPoint
OnDemandTaskContext::FuncEntryPoint
SOS_Task::Param::Execute
SOS_Scheduler::RunTask