Skip to main content
1 of 3
MBuschi
  • 4.7k
  • 1
  • 5
  • 17

usually query leave to the sql server enegine to manage how a query will be executed and this bring to focus on the parallelism settings of the instances (or databases in the newer versions of sql server).

It's a matter of concurrency. Here you can find the sql server ingine parameters that govern the parallelism in query execution:

https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-the-max-degree-of-parallelism-server-configuration-option?view=sql-server-ver15

MAXDOP instance parameter determines the max number of cpu that a single query can use to run.

There is another parameter that govern the threshold for using a parallel plan or not.

https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-the-cost-threshold-for-parallelism-server-configuration-option?view=sql-server-ver15

If sql server expects a duration higher than this parameter (in second) then it will use a parallel plan (i.e. more than one logical cpu)

MBuschi
  • 4.7k
  • 1
  • 5
  • 17