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.