DSN_PGROUP_TABLE
The parallel group table, DSN_PGROUP_TABLE, contains information about the parallel groups in a query.
Qualifiers
- 'SYSIBM'
- One instance of this table can be created with the SYSIBM qualifier. DB2 and SQL optimization tools might use the table and the data that it contains. The table is created when you run job DSNTIJSG when you install or migrate DB2.
- 'user-ID'
- You can create additional instances of EXPLAIN tables that are qualified by user ID. These tables are populated with statement cost information when you issue the EXPLAIN statement or bind. They are also populated when you specify EXPLAIN(YES) or EXPLAIN(ONLY) in a BIND or REBIND command. SQL optimization tools might also create EXPLAIN tables that are qualified by a user ID. You can find the SQL statement for creating an instance of these tables in member DSNTESC of the SDSNSAMP library.
Sample CREATE TABLE statement
You can find a sample CREATE TABLE statement for each EXPLAIN table in member DSNTESC of the prefix.SDSNSAMP library.
Column descriptions
The following table describes the columns of DSN_PGROUP_TABLE
Column name | Data type | Description |
---|---|---|
QUERYNO | INTEGER NOT NULL | A number that identifies the statement
that is being explained. The origin of the value depends on the context of the row:
When the values of QUERYNO are based on the statement number in the source program, values that exceed 32767 are reported as 0. However, in certain rare cases, the value is not guaranteed to be unique. When the SQL statement is embedded in a compiled SQL function or native SQL procedure, if the QUERYNO clause is specified, its value is used by DB2. Otherwise DB2 assigns a number based on the line number of the SQL statement in the compiled SQL function or native SQL procedure. |
QBLOCKNO | SMALLINT NOT NULL | A number that identifies each query block within a query. The value of the numbers are not in any particular order, nor are they necessarily consecutive. |
PLANNAME | VARCHAR(24) NOT NULL | The application plan name. |
COLLID | VARCHAR(128) NOT NULL | The collection ID:
When the SQL statement is embedded in a compiled SQL function or native SQL procedure, this column indicates the schema name of the compiled SQL function or native SQL procedure. |
PROGNAME | VARCHAR(128) NOT NULL | The name of the program or package
containing the statement being explained. Applies only to embedded EXPLAIN statements and to
statements explained as the result of binding a plan or package. A blank indicates that the column
is not applicable. When the SQL statement is embedded in a compiled SQL function or native SQL procedure, this column indicates the specific name of the compiled SQL function or native SQL procedure. |
EXPLAIN_TIME | TIMESTAMP NOT NULL | The
time when the EXPLAIN information was captured:
|
VERSION | VARCHAR(122) NOT NULL | The version identifier for the
package. Applies only to an embedded EXPLAIN statement executed from a package or to a statement
that is explained when binding a package. A blank indicates that the column is not applicable. When the SQL statement is embedded in a compiled SQL function or native SQL procedure, this column indicates the version identifier of the compiled SQL function or native SQL procedure. |
GROUPID | SMALLINT NOT NULL | The parallel group identifier within the current query block. |
FIRSTPLAN | SMALLINT NOT NULL | The plan number of the first contributing mini-plan associated within this parallel group. |
LASTPLAN | SMALLINT NOT NULL | The plan number of the last mini-plan associated within this parallel group. |
CPUCOST | REAL NOT NULL | The estimated total CPU cost of this parallel group in milliseconds. |
IOCOST | REAL NOT NULL | The estimated total I/O cost of this parallel group in milliseconds. |
BESTTIME | REAL NOT NULL | The estimated elapsed time for each parallel task for this parallel group. |
DEGREE | SMALLINT NOT NULL | The degree of parallelism for this parallel group determined at bind time. Max parallelism degree if the Table space is large is 255, otherwise 64. |
MODE | CHAR(1) NOT NULL | The parallel mode:
|
REASON | SMALLINT NOT NULL | The reason code for downgrading parallelism mode. |
LOCALCPU | SMALLINT NOT NULL | The number of CPUs currently online when preparing the query. |
TOTALCPU | SMALLINT NOT NULL | The total number of CPUs in Sysplex. LOCALCPU and TOTALCPU are different only for the DB2 coordinator in a Sysplex. |
FIRSTBASE | SMALLINT | The table number of the table that partitioning is performed on. |
LARGETS | CHAR(1) | 'Y' if the TableSpace is large in this group. |
PARTKIND | CHAR(1) | The partitioning type:
|
GROUPTYPE | CHAR(3) | Determines what operations this parallel group contains: table Access, Join, or Sort 'A' 'AJ' 'AJS' |
ORDER | CHAR(1) | The ordering requirement of this parallel group :
|
STYLE | CHAR(4) | The Input/Output format style of this parallel group. Blank for IO
Parallelism. For other modes:
|
RANGEKIND | CHAR(1) | The range type:
|
NKEYCOLS | SMALLINT | The number of interesting key columns, that is, the number of columns that will participate in the key operation for this parallel group. |
LOWBOUND | VARCHAR(40) FOR BIT DATA | The low bound of parallel group. |
HIGHBOUND | VARCHAR(40) FOR BIT DATA | The high bound of parallel group. |
LOWKEY | VARCHAR(40) FOR BIT DATA | The low key of range if partitioned by key range. |
HIGHKEY | VARCHAR(40) FOR BIT DATA | The high key of range if partitioned by key range. |
FIRSTPAGE | CHAR(4) FOR BIT DATA | The first page in range if partitioned by page range. |
LASTPAGE | CHAR(4) FOR BIT DATA | The last page in range if partitioned by page range. |
GROUP_MEMBER | VARCHAR(24) NOT NULL | The member name of the DB2 that executed EXPLAIN. The column is blank if the DB2 subsystem was not in a data sharing environment when EXPLAIN was executed. |
HOST_REASON | SMALLINT | IBM® internal use only. |
PARA_TYPE | CHAR(4) | IBM internal use only. |
PART_INNER | CHAR(1) | IBM internal use only. |
GRNU_KEYRNG | CHAR(1) | IBM internal use only. |
OPEN_KEYRNG | CHAR(1) | IBM internal use only. |
APPLNAME | VARCHAR(24) NOT NULL WITH DEFAULT | The name of the application plan
for the row. Applies only to embedded EXPLAIN statements that are executed from a plan or to
statements that are explained when binding a plan. A blank indicates that the column is not
applicable. When the SQL statement is embedded in a compiled SQL function or native SQL procedure, this column is not used, and is blank. |
SECTNOI | INTEGER NOT NULL WITH DEFAULT | The section number of the statement. The value is taken from the same column in SYSPACKSTMT or SYSSTMT tables and can be used to join tables to reconstruct the access path for the statement. This column is applicable only for static statements. The default value of -1 indicates EXPLAIN information that was captured in DB2 9 or earlier. |
STRAW_MODEL | CHAR(1) NOT NULL WITH DEFAULT | IBM internal use only. |