The SET_PARALLEL stored procedure is used to force parallelism for DDL and DML and QUERY for the current session by executing the following alter session commands
ALTER SESSION FORCE PARALLEL QUERY PARALLEL V_PARALLEL; ALTER SESSION FORCE PARALLEL DDL PARALLEL V_PARALLEL; ALTER SESSION FORCE PARALLEL DML PARALLEL V_PARALLEL;
The default value of zero will use the GET_CPU_COUNT function to determine the maximum degree of parallelism to use. Default is CPU_COUNT minus 1 for less than 8 CPU's or minus 2 for 8 or more CPU's.
Parameter | Description | |
---|---|---|
PARALLEL | Type: | INPUT |
Datatype: | NUMBER | |
Default Value: | 0 | |
Description | The degree of parallelism to force the session to use. | |
Options |
0 = Maximum 1 = No Parallel (Disabled) N = Specified number of CPU’s |
Exception
- NO_ALTER_PARALLEL – Exception for ORA -12841 errors.
- OTHERS
Examples
EXEC IN_DB_UTIL.SET_PARALLEL(V_PARALLEL); EXEC IN_DB_UTIL.SET_PARALLEL; EXEC IN_DB_UTIL.SET_PARALLEL(1); EXEC IN_DB_UTIL.SET_PARALLEL(6);