CXPacket isn’t the cause, it is a symptom

All to often when people deal with parallel queries they see that some threads of the query have a wait type of CXPacket so they assume that the parallel execution plan is causing a problem, but it probably isn’t.

What is causing the problem is the threads which don’t have a wait type of CXPACKET.  They probably have an IO, or Scheduler wait happening and the other threads can’t resume processing until that wait condition has been resolved.

Changing the query to only use a single thread will mask this because the query now only has a single thread so it is easier to identify the paused thread as it is the only thread running.  What you actually want to do to resolve this is look into the wait type of the thread which is still running and see what is holding up that thread, resolve that issue and the CXPACKET waits should then go away.

Denny

Share

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trust DCAC with your data

Your data systems may be treading water today, but are they prepared for the next phase of your business growth?