How to reject parallelism in a query ?

  • While tuning a S.P. for performance, I found that it better executes without parallelism. But I don't want to change it's threshold in production, what I am looking for is some hint or any other method that works on a query level.

  • You could use the query hint MAXDOP.

    Check the reference: http://technet.microsoft.com/en-us/library/ms181714.aspx

    Example F.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Also, check the cost threshold for parallelism on the server. The default value is 5 and that is radically low for most systems. Changing that to an appropriate value (say 50) will eliminate a lot of unnecessary parallelism.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • I was going to suggest disabling bit 29 on DBCC TIMEWARP which suppresses the availability of parallel universes.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply