Parallelism when execution cost lower than Cost of parallelism

sakuraime 2,326 Reputation points
2020-08-19T08:37:11.897+00:00

18697-cop.jpg

why is that.? my cost of parallelism is default 5

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,671 questions
0 comments No comments
{count} votes

11 answers

Sort by: Most helpful
  1. tibor_karaszi@hotmail.com 4,311 Reputation points
    2020-08-19T09:01:22.86+00:00

    The cut-off value is for the whole query, not an individual operator. Also, it is for the serial plan. I.e. force a serial plan and look at the estimated subtree cost for the whole query. This is what the sp_configure value is compared to.

    2 people found this answer helpful.
    0 comments No comments

  2. Andrew Bainbridge 1 Reputation point
    2020-08-19T09:01:27.317+00:00

    Hi,
    During compilation, the optimizer will consider a serial plan. If the cost of the serial plan exceeds your threshold of 5, the optimizer will then consider a parallel plan. If the parallel plan is less costly than the serial plan, SQL will use that. So, I'd guess that the serial plan cost was > 5, though the parallel plan is not. You could try forcing a serial plan with a query hint to see what the cost is.
    Thanks
    Andrew


  3. sakuraime 2,326 Reputation points
    2020-08-22T09:54:27.213+00:00

    the cost of this plan shown in the screen is the total subtree cost.

    0 comments No comments

  4. tibor_karaszi@hotmail.com 4,311 Reputation points
    2020-08-22T12:44:50.933+00:00

    You are showing us one operator in the plan, with its subtree cost of 2.426. What is relevant is the subtree cost for the whole plan! The subtree cost you see for the outermost Select operator.

    0 comments No comments

  5. sakuraime 2,326 Reputation points
    2020-08-23T02:25:50.817+00:00

    no . that's point to the "select" operator already

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.