January 18, 2005 02:18 PM

Forcing a Parallel Plan

Rating: (0)
SQL Server Magazine
InstantDoc ID #44843

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?

...

...This article is for paid Professional Members only.

Already a Professional Member? Please log in now:

NOT A PROFESSIONAL MEMBER? YOU CHOOSE:

Professional Membership

Monthly

Annual

VIP Membership

Monthly

Annual

Add a Comment

Bryan,

Your response about OrgName like '%SPOT%' is on query tuning, not on how to get the query to run in paralllel processing. I am still left hungry about knowing more. Running queries in parallel is always better for us since we have an 8-way processor. Would setting cost threshold for parallelism option to 0 will allow us to use all processors, thus improving response time?
Developers in house came up with a solution which breaks down the query in 10 little queries, can collates the 10 result sets into a single one. I would rather have SQL run one query, do the parallel processing, and return to me one result set. Would it be the way to go, to set the cost threshold for parallelism and hope SQL picks out the optimum plan?

Thanks for the good work.

nonicknameplease.

nonicknameplease 1/28/2005 9:46:29 AM


You must log on before posting a comment.

Are you a new visitor? Register Here
GOOGLE LINKS
SPONSORED LINKS
FEATURED LINKS