posted 5/29/2012 9:16:52 AM by Amit Bansal - Views: [7494]
use AdventureWorks2008R2 GO select * from sales.SalesOrderDetail order by LineTotal DESC GO
use AdventureWorks2008R2 GO select * from sales.SalesOrderDetail order by LineTotal DESC OPTION (MAXDOP 1) GO
sp_configure 'cost threshold for parallelism', 11 GO RECONFIGURE GO
Does SQL Server produce parallel plan? What is the cost? Is it less than cost threshold of parallelism?
There’s lot more to this subject and I have just given a simple explanation to clarify the meaning of this server-level property.
If you liked this post, do like us on FaceBook at http://www.FaceBook.com/SQLServerGeeks
Have a SQL Server question? Join the fastest growing SQL Server facebook group at: http://www.facebook.com/groups/458103987564477/
Regards,
Amit Bansal
http://www.twitter.com/A_Bansalhttp://www.twitter.com/SQLServerGeekshttp://www.amitbansal.net
Visit my FaceBook page at http://www.facebook.com/AmitRSBansalContribute on SQLServerGeeks.com: visit http://www.sqlservergeeks.com/default-category/write-for-us
Amit Bansal (Member since: 3/12/2011 4:59:54 PM) Follow Amit at Twitter @A_Bansal : Amit Bansal is the CTO of eDominer Systems & Peopleware India. He is a consultant, trainer, writer, speaker & evangelist on SQL Server & Business Intelligence. A seasoned speaker; he speaks at major summits and conferences of Microsoft worldwide including TechED, MCT Summits, MSDN & TechNet conferences. Over the last 8 years, he has consulted, trained & mentored more than 6000 IT professionals on SQL Server & Business Intelligence and worked with top notch blue chip companies worldwide including Microsoft, Infosys, Wipro, RBS, HCL, HP, Siemens, IBM, Accenture, etc. He has delivered more than 400 workshops on SQL Server & Business Intelligence. Apart from holding many Microsoft credentials, he is also a Microsoft Most Valuable Professional (MVP) awardee on SQL Server. He is also one of the first Microsoft Certified Trainer in India. Amit has worked with Microsoft in India and US as a Subject Matter Expert in various capacities participating in OD sessions, technical reviewing, etc. He is also a very active community lead in Asia Pacific. Visit www.amitbansal.net to know more. Subscribe to Amit’s blog and be a member of his technical forum at www.SQLServerGeeks.com - an exclusive SQL Server portal. Visit www.peoplewareindia.com for Corporate Training solutions. FaceBook – http://www.facebook.com/people/Amit-Bansal/525339346 LinkedIn – http://www.linkedin.com/pub/amit-bansal/7/121/755
View Amit Bansal 's profile
Short and simple illustration while covering up the most. Nice blog Amit!
The best explanation about estimated subtree cost I have seen so far is the below one from QP team.
http://blogs.msdn.com/b/sqlqueryprocessing/archive/2006/10/11/what-is-this-cost.aspx
Folks who want to know more can probably refer to the above link :)
As per SQL Server Books Online "Configure the cost threshold for parallelism Server Configuration Option" http://msdn.microsoft.com/en-us/library/ms190949.aspx
The cost threshold for parallelism option specifies the threshold at which SQL Server creates and runs parallel plans for queries. SQL Server creates and runs a parallel plan for a query only when the estimated cost to run a serial plan for the same query is higher than the value set in cost threshold for parallelism. The cost refers to an estimated elapsed time in seconds required to run the serial plan on a specific hardware configuration.
Hi MArc, I knew someone would point that out :) - unfortunately there are many of those one-liners in BOL that I do not understand :( and thats why I explained in simple example using Estimated Subtree cost. However, I have updated my blog now to be a bit lenient on that BOL one-liner :)
Thanks Prashant !
Leave a comment