March 7, 2014 at 2:49 pm
I don't have any query hints being used, at server level i have MAXDOP = 5 and CTP = 1, in the exec plan i see that query is using MAXDOP = 0, btw the cost of query is 1440 . How is that possible? Shouldn't it be using MAXDOP =1 since cost is more than 5????
For the same query when i set MAXDOP =4 and CTP 20 , i see that query is using MAXDOP =4 and query cost is 1300. This makes sense.
March 7, 2014 at 3:21 pm
curious_sqldba (3/7/2014)
I don't have any query hints being used, at server level i have MAXDOP = 5 and CTP = 1, in the exec plan i see that query is using MAXDOP = 0, btw the cost of query is 1440 . How is that possible? Shouldn't it be using MAXDOP =1 since cost is more than 5????For the same query when i set MAXDOP =4 and CTP 20 , i see that query is using MAXDOP =4 and query cost is 1300. This makes sense.
When you say cost of the query, what cost are you referring to ? Could you post the execution plan.
Actually query cost has to be compared with CTP, not with the parallelism value.
--
SQLBuddy
March 7, 2014 at 3:34 pm
sqlbuddy123 (3/7/2014)
curious_sqldba (3/7/2014)
I don't have any query hints being used, at server level i have MAXDOP = 5 and CTP = 1, in the exec plan i see that query is using MAXDOP = 0, btw the cost of query is 1440 . How is that possible? Shouldn't it be using MAXDOP =1 since cost is more than 5????For the same query when i set MAXDOP =4 and CTP 20 , i see that query is using MAXDOP =4 and query cost is 1300. This makes sense.
When you say cost of the query, what cost are you referring to ? Could you post the execution plan.
Actually query cost has to be compared with CTP, not with the parallelism value.
--
SQLBuddy
Attached is actual exec plan.
March 10, 2014 at 2:54 pm
curious_sqldba (3/7/2014)
sqlbuddy123 (3/7/2014)
curious_sqldba (3/7/2014)
I don't have any query hints being used, at server level i have MAXDOP = 5 and CTP = 1, in the exec plan i see that query is using MAXDOP = 0, btw the cost of query is 1440 . How is that possible? Shouldn't it be using MAXDOP =1 since cost is more than 5????For the same query when i set MAXDOP =4 and CTP 20 , i see that query is using MAXDOP =4 and query cost is 1300. This makes sense.
When you say cost of the query, what cost are you referring to ? Could you post the execution plan.
Actually query cost has to be compared with CTP, not with the parallelism value.
--
SQLBuddy
Attached is actual exec plan.
Update:
I meant MAXDOP =1 and CTP = 5 in my original post.
March 10, 2014 at 2:58 pm
MAXDOP =1 means disabling the parallelism. That's why SQL Server doesn't consider parallelizing the query.
That's why I couldn't see that in the execution plan you posted.
--
SQLBuddy
March 11, 2014 at 7:45 am
sqlbuddy123 (3/10/2014)
MAXDOP =1 means disabling the parallelism. That's why SQL Server doesn't consider parallelizing the query.That's why I couldn't see that in the execution plan you posted.
--
SQLBuddy
Exactly, but my plan is using MAXDOP =0 ( 24 cores) in my case. Did you notice this?
March 11, 2014 at 8:10 am
curious_sqldba (3/11/2014)
sqlbuddy123 (3/10/2014)
MAXDOP =1 means disabling the parallelism. That's why SQL Server doesn't consider parallelizing the query.That's why I couldn't see that in the execution plan you posted.
--
SQLBuddy
Exactly, but my plan is using MAXDOP =0 ( 24 cores) in my case. Did you notice this?
Yes. Does the query have any function calls?
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
March 11, 2014 at 8:17 am
curious_sqldba (3/11/2014)
Exactly, but my plan is using MAXDOP =0 ( 24 cores) in my case. Did you notice this?
Where did you find that ? I don't see any Parallelism operator in the plan.
--
SQLBuddy
March 11, 2014 at 8:27 am
ChrisM@Work (3/11/2014)
curious_sqldba (3/11/2014)
sqlbuddy123 (3/10/2014)
MAXDOP =1 means disabling the parallelism. That's why SQL Server doesn't consider parallelizing the query.That's why I couldn't see that in the execution plan you posted.
--
SQLBuddy
Exactly, but my plan is using MAXDOP =0 ( 24 cores) in my case. Did you notice this?
Yes. Does the query have any function calls?
No function calls.
March 11, 2014 at 8:28 am
sqlbuddy123 (3/11/2014)
curious_sqldba (3/11/2014)
Exactly, but my plan is using MAXDOP =0 ( 24 cores) in my case. Did you notice this?
Where did you find that ? I don't see any Parallelism operator in the plan.
--
SQLBuddy
If you hover your mouse to the insert statement you will see it is using DOP =0.
March 11, 2014 at 8:30 am
curious_sqldba (3/11/2014)
sqlbuddy123 (3/10/2014)
MAXDOP =1 means disabling the parallelism. That's why SQL Server doesn't consider parallelizing the query.That's why I couldn't see that in the execution plan you posted.
--
SQLBuddy
Exactly, but my plan is using MAXDOP =0 ( 24 cores) in my case. Did you notice this?
MAXDOP is not the same as "Degree of Parallelism" on the properties sheet of the INSERT operator. If you're still unsure, inspect the properties sheet of any of the index/table scans/seeks, which show "Parallel = False".
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
March 11, 2014 at 8:36 am
ChrisM@Work (3/11/2014)
curious_sqldba (3/11/2014)
sqlbuddy123 (3/10/2014)
MAXDOP =1 means disabling the parallelism. That's why SQL Server doesn't consider parallelizing the query.That's why I couldn't see that in the execution plan you posted.
--
SQLBuddy
Exactly, but my plan is using MAXDOP =0 ( 24 cores) in my case. Did you notice this?
MAXDOP is not the same as "Degree of Parallelism" on the properties sheet of the INSERT operator. If you're still unsure, inspect the properties sheet of any of the index/table scans/seeks, which show "Parallel = False".
Right, MAXDOP means the maximum it would go to based on Cost, in my case it should't go pass DOP =1 when cost is greater than 5, so cost is greater than 5 but it is using DOP = 0?
March 11, 2014 at 8:44 am
curious_sqldba (3/11/2014)
ChrisM@Work (3/11/2014)
curious_sqldba (3/11/2014)
sqlbuddy123 (3/10/2014)
MAXDOP =1 means disabling the parallelism. That's why SQL Server doesn't consider parallelizing the query.That's why I couldn't see that in the execution plan you posted.
--
SQLBuddy
Exactly, but my plan is using MAXDOP =0 ( 24 cores) in my case. Did you notice this?
MAXDOP is not the same as "Degree of Parallelism" on the properties sheet of the INSERT operator. If you're still unsure, inspect the properties sheet of any of the index/table scans/seeks, which show "Parallel = False".
Right, MAXDOP means the maximum it would go to based on Cost, in my case it should't go pass DOP =1 when cost is greater than 5, so cost is greater than 5 but it is using DOP = 0?
It's a serial plan, yes. It's an expensive plan so you would expect it to be a parallel plan. I'd guess you've used MAXDOP = 1 as a query hint.
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
March 11, 2014 at 9:03 am
curious_sqldba (3/7/2014)
I don't have any query hints being used, at server level i have MAXDOP = 5 and CTP = 1, in the exec plan i see that query is using MAXDOP = 0, btw the cost of query is 1440 . How is that possible? Shouldn't it be using MAXDOP =1 since cost is more than 5????For the same query when i set MAXDOP =4 and CTP 20 , i see that query is using MAXDOP =4 and query cost is 1300. This makes sense.
Have you checked the plan before and after obfuscation?
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
March 11, 2014 at 9:06 am
ChrisM@Work (3/11/2014)
curious_sqldba (3/11/2014)
sqlbuddy123 (3/10/2014)
MAXDOP =1 means disabling the parallelism. That's why SQL Server doesn't consider parallelizing the query.That's why I couldn't see that in the execution plan you posted.
--
SQLBuddy
Exactly, but my plan is using MAXDOP =0 ( 24 cores) in my case. Did you notice this?
MAXDOP is not the same as "Degree of Parallelism" on the properties sheet of the INSERT operator. If you're still unsure, inspect the properties sheet of any of the index/table scans/seeks, which show "Parallel = False".
True. Degree of parallelism (Server Level ) and MAXDOP query hint are different than this Degree of Parallelism (Query Plan).
Also MAXDOP = 0 (Server Level or Query Hint) doesn't necessarily mean all Cores. It means that we are leaving it to SQL Server to decide the number of cores to be used for Parallel plans.
In Query Plan it means serial plan.
--
SQLBuddy
Viewing 15 posts - 1 through 15 (of 17 total)
You must be logged in to reply to this topic. Login to reply