SQLServerCentral Article

Unmasking CXPACKET and CXCONSUMER in SQL Server: What Your Execution Plan Isn’t Telling You

This article dives deep into cxpacket and cxconsumer in sql server, explaining how to simulate each, when they appear, and why they matter. Using live execution plans, wait monitoring, and worker thread diagnostics, we uncover how uneven parallelism triggers thread sync waits—and how SQL Server sometimes hides real issues behind innocent-looking CXCONSUMER waits. Includes step-by-step queries, tuning tips, and a real-world scenario where repartition streams quietly ruined performance.

External Article

State Transition Constraints

About two decades ago, I introduced the concept of transition constraints to show Data Validation in a database is a lot more complex than seeing if a string parameter really is an integer. In October of 2008, I did an article called Constraint Yourself! on how to use DDL constraints to assure data integrity. One of the topics in that piece was a look at state transition constraints via an auxiliary table.

SQLServerCentral Editorial

The Long Weekend

In the US, this is the Independence Day weekend. I had a few spare vacation days, so I tacked one on, making this a four day weekend. My plans are simple. Prep for my family coming over on the 5th for a celebration of the 4th (Ha!). Work on my query tuning book (gotta make […]

SQLServerCentral Editorial

Own Your Mistakes

Hello, Grant again as Steve is on sabbatical. My evenings and weekends are currently being used to update my SQL Server query performance book for 2025. I really enjoy it because writing the book forces me to structure my learning on SQL Server 2025, not just hit it in some slipshod manner. Plus, I've got […]

SQLServerCentral Editorial

Filling Big Shoes

Hey all! It's me, Grant. For those who don't me, Grant Fritchey. I work with Steve Jones, the person normally talking to you here. Yes, Redgate actually employs me, and continues to. I don't know why either. Anyway, Steve is off for a few weeks on his sabbatical. More power to him and I hope […]

Blogs

Solving SQL Server Mysteries with a Whole Gang of Sleuths -Scooby Dooing Episode 4

By

One thing I’ve always loved about the Scooby-Doo cartoon is that he never solved...

SQL Server Availability Groups

By

Flexibility and Scale at the Database Level When SQL Server 2012 introduced Availability Groups...

Modify Power BI page visibility and active status with Semantic Link Labs

By

Setting page visibility and the active page are often overlooked last steps when publishing...

Read the latest Blogs

Forums

Password Guidance

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Password Guidance

Using table variables in T-SQL

By Alessandro Mortola

Comments posted to this topic are about the item Using table variables in T-SQL

Azure elastic query credential question

By cphite

I am trying to check out elastic query between two test instances we have...

Visit the forum

Question of the Day

Using table variables in T-SQL

What happens if you run the following code in SQL Server 2022+?

declare @t1 table (id int);

insert into @t1 (id) values (NULL), (1), (2), (3);

select count(*)
from @t1
where @t1.id is distinct from NULL;
 

See possible answers