You can prevent Db2 from
using parallel processing.
Procedure
To disable parallel operations, use any of the following approaches:
- For static SQL, rebind the package and specify the DEGREE(1)
bind option.
For dynamic SQL, set the CURRENT DEGREE special register value to 1 by issuing the following SQL statement:
SET CURRENT DEGREE = '1';
The default value for CURRENT DEGREE is 1 unless your installation has changed the default for the CURRENT DEGREE special register.
The use of data partitioned secondary indexes (DPSI) to drive parallelism is not disabled by the values of the DEGREE bind option or the CURRENT degree special register. To disable DPSI parallelism, set the PARAMDEG_DPSI subsystem parameter value to DISABLE. For more information, see MAX DEGREE FOR DPSI field (PARAMDEG_DPSI subsystem parameter).
- Set the parallel sequential threshold (VPPSEQT) to 0.
- Insert rows in a resource limit table (DSNRLSTxx) to restrict the parallelism mode:
- Specify the RLFFUNC value for each type of parallelism that you want to disable:
- CP parallelism
- Insert a row that contains the RLFFUNC='4' value.
To disable all query parallelism for a dynamic query, you must insert a separate row for each possible mode of parallelism.
- Qualify the rows according to the following rules:
Qualifying by plan or by package are not separate functions for parallelism, as they are for predictive and reactive governing:
- When the row specifies a plan name, Db2 finds the row only for queries that are executed from the plan.
- When the row specifies a package name, Db2 finds the row only for queries that are executed from the package.
The values of the RLFCOLLN, RLFPKG, and RLFPLAN columns can be blank for rows that are qualified by authorization ID only.
If parallelism is disabled for a query, the query runs sequentially. If no entry can be found in your resource limit table that applies to parallelism, or if your resource limit table cannot be read, the resource limit facility does not disable query parallelism.
Example
If
the following resource limit table is active, it causes the following
effects:
- Disables CP parallelism and Sysplex query parallelism for all
dynamic queries in the CPUHOG package.
Table 1. Example
RLST to govern query parallelism
| RLFFUNC |
AUTHID |
LUNAME |
RLFCOLLN |
RLFPKG |
| 4 |
(blank) |
PUBLIC |
blank |
CPUHOG |
What to do next
To determine whether parallelism
has been disabled by a value in your resource limit specification
table (DSNRLSTxx), look for a non-zero value in
field QXRLFDPA in IFCID 0002 or 0003. The QW0022RP field in IFCID
0022 indicates whether this particular statement was disabled.