It can be done by calling the trace flag 8649 in a query option.


This trace flag causes the cost of the query to be 0, which will always be below the cost threshold for parallelism and therefore the query will be considered for a parallel plan.

Does attempting to force a T-SQL query to use parallelism in this way have any downsides?

sample tutorial how to force parallelism

  • You used the word "force", but as the previous sentence suggests, parallelism is only considered even with a zero cost threshold. – Dan Guzman Oct 12 '16 at 10:22
  • That's because of my edit to the question. I have made a further edit. – James Anderson Oct 12 '16 at 10:55
  • To be clear, the trace flag doesn't cause the cost of the query to be 0. Also, Adam Machanic talks about downsides to 8649 as well. – Aaron Bertrand Oct 12 '16 at 12:03

It has one big downside that is stated at the end of that post:

Even experts with decades of SQL Server experience and detailed internal knowledge will want to be careful with this trace flag. I cannot recommend you use it directly in production unless advised by Microsoft

Interesting to use when testing but not really for production.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.