MAX_QUERY_PARALLELISM option

Function

Sets upper bound for parallel execution of GROUP BY operations and for arms of a UNION.

Allowed values

Integer less than or equal to number of CPUs.

Default

24

Scope

Can be set temporary for an individual connection or for the PUBLIC group. Takes effect immediately.

Description

This parameter sets an upper bound which limits how parallel the optimizer will permit query operators to go. This can influence the CPU usage for many query join, GROUP BY, UNION, ORDER BY and other query operators.

Systems with more than 24 CPU cores often benefit from a larger value, up to the total number of CPU cores on the system; you can experiment to find the best value for this parameter for your system and queries.

Systems with 24 or fewer CPU cores should not need to reduce this value, unless excessive system time is seen. In that case, you can try reducing this value to determine if that adjustment can lower the CPU system time and improve query response times and overall system throughput.