The interesting case of cost threshold for parallelism

  • Hi ,

    Just come across an interest case while investigating an SP.

    The query plan shows parallelism even though the run time is 0.2 seconds. The server setting for MAXDOP is 0 and the

    cost threshold for parallelism is at 5 seconds.

    I ran the query with Maxdrop option 1 and the duration remains the similar while cpu usage is halved.

    Sorry if I may have rambled a bit but my question is..

    Why if the execution time is well under 5 seconds is the optimizer/engine bringing parallelism to the query?

    Regards

    Eoin

    PS I know that according to the rules of etiquette, I should post the SP code, however this is more of an engine/optimizer decision query.

  • Bump

  • From http://technet.microsoft.com/en-us/library/ms188603(SQL.90).aspx:

    In certain cases, a parallel plan may be chosen even though the query's cost plan is less than the current cost threshold for parallelism value. This can happen because the decision to use a parallel or serial plan is based on a cost estimate provided before the full optimization is complete.

    Looks like you're running into one of these cases based on the query.

Viewing 3 posts - 1 through 2 (of 2 total)

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