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
  •  | 
  •  

質問

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

役に立ちましたか?

解決

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

Per query, use the MAXDOP hint

他のヒント

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top