Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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.

share|improve this answer

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.

share|improve this answer

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

share|improve this answer

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/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.