CURRENT DEGREE special register
The CURRENT DEGREE special register specifies the degree of intrapartition parallelism for the execution of dynamic SQL statements. (For static SQL, the DEGREE bind option provides the same control.)
The data type of the register is CHAR(5). Valid values are ANY or the string representation of an integer between 1 and 32 767, inclusive.
If the value of CURRENT DEGREE represented as an integer is 1 when an SQL statement is dynamically prepared, the execution of that statement will not use intrapartition parallelism.
If the value of CURRENT DEGREE represented as an integer is greater than 1 and less than or equal to 32 767 when an SQL statement is dynamically prepared, the execution of that statement can involve intrapartition parallelism with the specified degree.
If the value of CURRENT DEGREE is ANY when an SQL statement is dynamically prepared, the execution of that statement can involve intrapartition parallelism using a degree determined by the database manager.
- The value of the maximum query degree (max_querydegree) configuration parameter
- The application runtime degree
- The SQL statement compilation degree
If the intra_parallel database manager configuration parameter is set to NO, the value of the CURRENT DEGREE special register will be ignored for the purpose of optimization, and the statement will not use intrapartition parallelism.
The value can be changed by invoking the SET CURRENT DEGREE statement.
The initial value of CURRENT DEGREE is determined by the dft_degree database configuration parameter.
The value in the CURRENT DEGREE special register and the intra_parallel setting can be overridden in a workload by setting the MAXIMUM DEGREE workload attribute.