February 27, 2018 at 5:52 am
Hi All
I've analyzed my plan cache and isolated a query with a cost of 19.1
This query uses parallelism
My system is configured with a max degree of parallelism of 0. (Server has a total of 24 CPU's)
I changed the max degree of parallelism on the instance from 0 to 4.
I immediately noticed that the cost of the same query went up to 29.8
Just for my own understanding, why would the cost of the query increase when changing the max degree of parallelism?
Thanks
February 27, 2018 at 6:02 am
SQLSACT - Tuesday, February 27, 2018 5:52 AMHi All
I've analyzed my plan cache and isolated a query with a cost of 19.1
This query uses parallelism
My system is configured with a max degree of parallelism of 0. (Server has a total of 24 CPU's)I changed the max degree of parallelism on the instance from 0 to 4.
I immediately noticed that the cost of the same query went up to 29.8Just for my own understanding, why would the cost of the query increase when changing the max degree of parallelism?
Thanks
The plan for the query will have changed from 24 threads to 4.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 27, 2018 at 6:21 am
The plan for the query will have changed from 24 threads to 4.
And this would affect the cost of the query?
Thanks
February 27, 2018 at 6:29 am
SQLSACT - Tuesday, February 27, 2018 6:21 AMThank youThe plan for the query will have changed from 24 threads to 4.
And this would affect the cost of the query?
Thanks
It does, yes. Guessing that the server you are tinkering with is a test server: change MAXDOP back to 0 (unrestricted), then copy out your parallel query twice to the same SSMS pane. Put OPTION (MAXDOP 24) after one of them and OPTION (MAXDOP 4) after the other, then compare the estimated plans.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 27, 2018 at 7:43 am
--Jeff Moden
Change is inevitable... Change for the better is not.
March 1, 2018 at 3:50 am
Thanks all for the assistance. 🙂
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply