DB2 10.5 for Linux, UNIX, and Windows

SET RUNTIME DEGREE command

Sets the maximum run time degree of intra-partition parallelism for SQL statements for specified active applications.

Scope

This command affects all database partitions that are listed in the $HOME/sqllib/db2nodes.cfg file.

Authorization

One of the following authorities:
  • SYSADM
  • SYSCTRL

Required connection

Instance. To change the maximum run time degree of intra-partition parallelism on a remote server, it is first necessary to attach to that server. If no attachment exists, the SET RUNTIME DEGREE command fails.

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-SET RUNTIME DEGREE FOR--+-ALL--------------------------+----->
                           |    .-,------------------.    |   
                           |    V                    |    |   
                           '-(----application-handle-+--)-'   

>--TO--degree--------------------------------------------------><

Command parameters

FOR
ALL
The specified degree will apply to all applications.
application-handle
Specifies the agent to which the new degree applies. List the values using the LIST APPLICATIONS command.
TO degree
The maximum run time degree of intra-partition parallelism.

Examples

The following example sets the maximum run time degree of parallelism for two users, with application-handle values of 41408 and 55458, to 4:
   db2 SET RUNTIME DEGREE FOR ( 41408, 55458 ) TO 4

Usage notes

This command provides a mechanism to modify the maximum degree of parallelism for active applications. It can be used to override the value that was determined at SQL statement compilation time.

The run time degree of intra-partition parallelism specifies the maximum number of parallel operations that will be used when the statement is executed. The degree of intra-partition parallelism for an SQL statement can be specified at statement compilation time using the CURRENT DEGREE special register or the DEGREE bind option. The maximum run time degree of intrapartition parallelism for an active application can be specified using the SET RUNTIME DEGREE command. The max_querydegree database manager configuration parameter specifies the maximum run time degree for any SQL statement executing on this instance of the database manager.

The actual run time degree will be the lowest of:
  • the max_querydegree configuration parameter
  • the application run time degree
  • the SQL statement compilation degree.

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.