There’s a lot of information on the internet about how to set MAXDOP correctly. Microsoft even provides a knowledge base article with their recommendations. However, if you look at it, there’s a fair amount of information to digest. I’m
lazy forgetfulefficient, so I wanted to put this into a script I could easily reuse and not have to remember all the details.
Please note that these are just guidelines, and you should consider carefully whether they fit your workloads and scenarios. As is the case anytime you are evaluating system settings, you should test carefully before and after making changes.
Read on for the explanation as well as a link to the script itself.