SYSQUERYSEL catalog table
The SYSQUERYSEL table contains information about the selectivity of predicates for queries in the SYSQUERY table that have been identified for extended optimization. It correlates to the SYSQUERY table by the QUERYID column. The schema is SYSIBM.
Column name | Data type | Description | Use |
---|---|---|---|
QUERYID | BIGINT
NOT NULL |
The identifier of the query. | S |
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. |
S |
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. | S |
APPLNAME | VARCHAR(24)
NOT NULL |
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. | S |
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. | S |
SECTNOI | INTEGER
NOT NULL |
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. | S |
COLLID | VARCHAR(128)
NOT NULL |
The collection ID:
|
S |
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 non-inline SQL function or native SQL procedure, this column is not used and is blank. |
S |
PREDNO | INTEGER
NOT NULL |
Identifies the predicate | S |
INSTANCE | SMALLINT
NOT NULL |
The selectivity instance, which is used to group related selectivities. | S |
SELECTIVITY | FLOAT
NOT NULL |
The selectivity of the predicate. | S |
WEIGHT | FLOAT (4)
NOT NULL |
The weight of the selectivity instance. For example, a value of .25 means that 25% of the time when a query is executed the predicate will have this selectivity. | S |
ASSUMPTION | VARCHAR(128)
NOT NULL |
Indicates how the selectivity was estimated, or
will be used: One of the following values:
|
S |
INSERT_TIME | TIMESTAMP
NOT NULL GENERATED ALWAYS AS ROW CHANGE TIMESTAMP |
The time when the row was inserted. | S |
EXPLAIN_TIME | TIMESTAMP
|
The time when the EXPLAIN information was captured:
|
S |
REMARKS | VARCHAR(762)
|
Internal use only. | S |