Why You Should Change the Cost Threshold for Parallelism

SQL Server, SQL Server 2016
I've written several times about the Cost Threshold for Parallelism and it's relationship to your execution plans, how to determine your execution plan cost, and even how to decide what value to set your Cost Threshold to. What I haven't explicitly addressed in extremely clear terms is why you should adjust your Cost Threshold for Parallelism. There are two reasons to modify this value. Cost Threshold for Parallelism Default Value The primary reason to change the Cost Threshold for Parallelism is because the default value is not a good choice for the vast majority of systems. The default value is 5. This means that when a query has an estimated cost greater than 5, it may get a parallel execution plan. Microsoft set the default value for the Cost Threshold…
Read More

Be Cautious Offering Guidance

Azure, SQL Server, T-SQL
Guidance is hard. Seriously, you'd think it would be easy. You'd think you say things like, don't shrink your database, most tables should have a clustered index, never go against a Sicilian when death is on the line, don't mix sharks and tornados, and that would be it. You'd be done. But it's not that easy. Even worse, it's SHOCKINGLY easy to get stuff wrong. An example. I was looking at information over at Microsoft Developers Network (MSDN) in the SQL Server Books Online. I was reading through information about wait types when I found this little beauty: Occurs when trying to synchronize the query processor exchange iterator. Know what that is? Yeah, OK, a few of you who memorize wait stats do (shut up Tom), but most of us…
Read More