You wrote:
What makes the processor wait once it has done its job?
It isn't the processor that is waiting nor is it the process that is waiting, it is the physical operation that has gone parallel that is waiting for the last thread to return its data.
If you had one thread reading the data then you would have a serial read like this:
1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
^ ^
| |
Start End
--> (t)
Example for 80 records
Now if the query optimizer decides to go parallel because of the CTFP (cost threshold for parallelism) and the MAXDOP setting of 0, then in a server with four (for simplification) cores, the process will ideally split the load of reading data via the index onto the four processors:
1 xxxxxxxxxxxxxxxxxxxxxx
2 xxxxxxxxxxxxxxxxxxxxxx
3 xxxxxxxxxxxxxxxxxxxxxx
4 xxxxxxxxxxxxxxxxxxxxxx
^ ^
| |
Start End
--> (t)
The process of retrieving 80 records is shorter in duration if the query can be executed in parallel. In doing so the Query Engine assumes an even distribution of data. This is based on up-to-date statistics.
In some case the statistics can be skewed (not up-to-date) and the workload is not distributed equally. Depending on the WHERE clause and tables involved and other factors, you could have a situation like this:
1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (40 rows)
2 x ( 1 row)
3 xxxxxxxxxxxxxxxxxxxxx (19 rows)
4 xxxxxxxxxxxxxxxxxxxxxx (20 rows)
^ ^
| |
Start End
--> (t)
As you can see, it takes longer to retrieve the data than if the statistics were up-to-date and the load of retrieving the data would be distributed evenly. It is still faster than a serial retrieval, BUT the other threads (2, 3, 4) have to wait until thread 1 has finished retrieving its lump of data.
These waits are the CXPACKETS and CXCONSUMER you may be observing. CXPACKETS (retrieving data in parallel) aren't bad. They even occur when date being retrieved is evenly distributed between the the threads, but then you have less CXCONSUMER (waiting for parallel data).
Answering Your Question
What makes the processor wait once it has done its job?
It's not waiting. It's performing.