Forcing a Parallel Plan

Can you force SQL Server to use a parallel plan instead of a serial one?

Brian Moran

January 17, 2005

1 Min Read
ITPro Today logo in a gray background | ITPro Today


The query in Listing 1 returns a result set in 35 seconds when I run it on database1 but returns the result set in 19 seconds on database2. The databases are structurally identical and reside on the same server. Database1 has only 10,000 rows more than database2. The query execution plans are almost identical, but on database2, the query uses a parallel plan; hence, the speedier execution time. Unfortunately, I have a limited ability to make structural changes to the queries or indexes, and when I run the query on database1, it often times out. Can I force SQL Server to use a parallel plan on database1?

No. You could change the cost threshold for parallelism option to 0, which would let SQL Server consider a parallel plan for a plan with a zero cost, but I don't know of a way to force SQL Server to pick a parallel plan over a serial one. Also, although you're limited in how much you can change the queries, you should realize that a search argument, such as OrgName LIKE '%SPOTS%', can't be effectively indexed because the leftmost part of the string is a wildcard. In this situation, you might get substantially better performance on both databases by using Full Text Search instead of a LIKE operator.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like