Why is cost threshold for parallelism ignored?

Anyone ever see Cost Threshold for Parallelism being ignored?

It is not being ignored. During the compilation process, the optimizer first considers a serial plan. If the estimated cost of that plan exceeds the Threshold, the optimizer goes on to look for a parallel plan. If the resulting parallel plan is costed below the best serial one, it will be chosen.

So, the parallel plan will have a lower cost that the serial one (which you cannot see). It is perfectly possible for the final parallel plan to have an estimated cost below the Threshold - the point is the best serial plan candidate exceeded the Threshold.

An example can be seen in my blog post on parallel plan bitmaps.


I'm pretty sure that sp_BlitzCache will show you the cost of the actual plan used for your queries, whereas the server will considers a parallel plan when the initially estimated cost exceeds the threshold value.

A noticable difference between estimated and actual query plan costs could happen if you have stale/bad statistics on your tables.

If you've identified a specific query that you want to run serially, you can add the following OPTION at the end of the statement - this will ensure a serial plan:

SELECT something
FROM somewhere
OPTION (MAXDOP 1);

Another option is to use the resource governor to control parallelism.