Which MAXDOP?

  • Comments posted to this topic are about the item Which MAXDOP?

  • I have seen people sometimes get confused about MAXDOP (however it gets applied) and number of threads allocated to a query. They are not the same.

    The degree of parallelism applies to every operation in the query that can be processed in parallel. This means that if multiple portions of the query can be processed at the same time, then each portion can have maxdop threads allocated to it. Therefore a query can have many more threads active than given in the query, DB, or server maxdop setting.

    Equally, if the query syntax includes an operator that cannot be parallelised, that portion of the query will be processed serially in a single thread. This can in some cases force the entire query to run as a single serial thread.

    If a given query is causing a problem, using a query-level maxdop can be a useful tool, but the planned and actual query plans should be examined as part of deciding if a query-level maxdop  would give the desired performance benefit.

    Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.

    When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply