Defining a computational partition group

Defining a computational partition group enables the optimizer to use a plan that distributes nickname data to the partitions of the computational partition group. You define a computational partition group to enable interpartition query parallelism for queries or parts of queries that reference only nicknames.

Before you begin

Before you begin

All partition groups used to represent the computational partition group on all the databases in the instance must have the same name. You can define these partition groups differently in each database, but they must have the same name. For example, three databases called DB1, DB2, and DB3 define a computational partition group that contains different nodes:
  • DB1: CPG contains nodes 1, 2, 3, and 4
  • DB2: CPG contains nodes 49, 50, and 53
  • DB3: CPG contains nodes 78 and 96
You can set the db2set variable to the name CPG. The name CPG is common to all databases, but the contents of the CPG are different for each database.

About this task

Restrictions

The optimizer uses computational partition groups for only the parts of a query that reference nicknames without referencing local data.

Procedure

To define a computational partition group, issue the following command at the command line.

db2set DB2_COMPPARTITIONGROUP=partitiongroup_name

where partitiongroup_name is the name of the partition group that you want to define as the computational partition group. The partition group must already be defined, and can be either a user-defined group or the default partition group IBMDEFAULTGROUP.

The following example shows how to define the computational partition group, FINANCE3, using the DB2_COMPPARTITIONGROUP registry variable.
db2set DB2_COMPPARTITIONGROUP=FINANCE3