-1

Google does not appear to have a definition of the term.

4 Answers 4

1

From Windows IT Pro:

A. You will only get this with SQL 7 because it only happens with parallel queries. It means that one thread of the query is waiting for a message packet from another, and the one it is waiting on is either blocked by a traditional cause or has hit some sort of parallelism bug.

CXPacket means it is waiting on a data packet - i.e. the results of an internal query is being passed. Exchange means that it is waiting on a control packet - i.e. waiting for a child/sibling process to tell you that it is finished.

If the query doesn't complete then make sure SP1 is applied as there are several parallel query fixes in SP1. If it still doesn't fix it then you have run into an unfixed bug and will need to contact Microsoft PSS and raise a bug report. You should be able to work-around the problem by adding MAXDOP(1) to the query which will prevent the query being parallelised.

This thread at SQL Team is also useful.

1

Possibly the CX is shorthand for "exchange", but since it appears to be related to parallelism, I'd guess it stood for "context" (as in "context switch").

To add to heavyd's answer: CXPACKET is a type of wait "that SQL Server uses to coordinate parallelism – and you can generally ignore it" (from this post). It's defined in sys.dm_os_wait_stats (MSDN, see the table of wait types), but I don't see anything indicating a specific origin for the term. That table gives this description:

Occurs when trying to synchronize the query processor exchange iterator. You may consider lowering the degree of parallelism if contention on this wait type becomes a problem.

1

Full form of CXPACKET is Class exchange packet and it happens which a query is running in parallelism.

1

CXPACKET stands for Class Exchange Packet. You will see this type of waits in SQL Servers where MAXDOP is set to anything but 1. MAXDOP is maximum degree of parallelism. Zero is the default of MAXDOP out of the box, and that means queries will attempt to use all the available cores. Don't leave MAXDOP set at ZERO, and don't set it to one (only one core is beat to death) unless you're sure you never want to use parallelism. It's common practice to set MAXDOP to [#of your cores - 4]. Must reserve some cores for the server itself. If you have hyperthreading this complicates the setting for MAXDOP, see MSFT article:

https://support.microsoft.com/en-us/kb/2806535

The SQL Server 2012 has a Best Practice Analyzer (SQL Server 2012 BPA), to help determine MAXDOP settings.

Watch Brent Ozar's excellent video on CXPACKET: https://www.brentozar.com/archive/2013/08/what-is-the-cxpacket-wait-type-and-how-do-you-reduce-it/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .