Does setting MaxDOP on Database level restrict CPUs for that DB or for Queries ran in that DB?

StackOverflow https://stackoverflow.com/questions/14261453

  •  14-01-2022
  •  | 
  •  

Question

We have a CPU with 16 cores. The CPU is used only for SQL server with a single database. Currently, MaxDOP is set to 0.

We were considering changing the MAXDOP to 8 in an attempt to limit the max number of CPU's used by a query, however a consultant DBA is stating that this will limit the number of CPU's used by the database.

Does anyone have any experience with this?

Thanks

Was it helpful?

Solution

At the server level = all queries. This is the max degree of parallelism option

Per query, use the MAXDOP hint

OTHER TIPS

You can always specify "OPTION (MAXDOP 1)" at the end of the query you want to limit. This will only affect that query.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top