DB2 v10.5 EXPLAIN TABLES

db2 解释表

1、ADVISE_INDEX 建议索引


COLUMN NAME DATA_TYPE DESCIRBE
EXPLAIN_REQUESTER VARCHAR(128) Authorization ID of initiator of this Explain request.
EXPLAIN_TIME TIMESTAMP Time of initiation for Explain request.
SOURCE_NAME VARCHAR(128) Name of the package running when the dynamic statement was explained or name of the source file when static SQL was explained.
SOURCE_SCHEMA VARCHAR(128) Schema, or qualifier, of source of Explain request.
SOURCE_VERSION VARCHAR(64) Version of the source of the Explain request.
EXPLAIN_LEVEL CHAR(1) Level of Explain information for which this row is relevant.
STMTNO INTEGER Statement number within package to which this explain information is related.
SECTNO INTEGER Section number within package to which this explain information is related.
QUERYNO INTEGER Numeric identifier for explained SQL statement. For dynamic SQL statements (excluding the EXPLAIN SQL statement) issued through CLP or CLI, the default value is a sequentially incremented value. Otherwise, the default value is the value of STMTNO for static SQL statements and 1 for dynamic SQL statements.
QUERYTAG CHAR(20) Identifier tag for each explained SQL statement. For dynamic SQL statements issued through CLP (excluding the EXPLAIN SQL statement), the default value is 'CLP'. For dynamic SQL statements issued through CLI (excluding the EXPLAIN SQL statement), the default value is 'CLI'. Otherwise, the default value used is blanks.
NAME VARCHAR(128) Name of the index.
CREATOR VARCHAR(128) Qualifier of the index name.
TBNAME VARCHAR(128) Name of the table or nickname on which the index is defined.
TBCREATOR VARCHAR(128) Qualifier of the table name.
COLNAMES CLOB(2M) List of column names.
UNIQUERULE CHAR(1) Unique rule:D = Duplicates allowedP = Primary indexU = Unique entries only allowed
COLCOUNT SMALLINT Number of columns in the key plus the number of include columns if any.
IID SMALLINT Internal index ID.
NLEAF BIGINT Number of leaf pages; -1 if statistics are not gathered.
NLEVELS SMALLINT Number of index levels; -1 if statistics are not gathered.
FIRSTKEYCARD BIGINT Number of distinct first key values; -1 if statistics are not gathered.
FULLKEYCARD BIGINT Number of distinct full key values; -1 if statistics are not gathered.
CLUSTERRATIO SMALLINT Degree of data clustering with the index; -1 if statistics are not gathered or if detailed index statistics are gathered (in which case, CLUSTERFACTOR will be used instead).
AVGPARTITION_ CLUSTERRATIO SMALLINT Degree of data clustering within a single data partition. -1 if the table is not table partitioned, if statistics are not gathered, or if detailed statistics are gathered (in which case AVGPARTITION_CLUSTERFACTOR will be used instead).
AVGPARTITION_ CLUSTERFACTOR DOUBLE Finer measurement of the degree of clustering within a single data partition. -1 if the table is not table partitioned, if statistics are not gathered, or if the index is defined on a nickname.
AVGPARTITION_PAGE_ FETCH_PAIRS VARCHAR(520) A list of paired integers in character form. Each pair represents a potential buffer pool size and the corresponding page fetches required to access a single data partition from the table. Zero-length string if no data is available, or if the table is not table partitioned.
DATAPARTITION_ CLUSTERFACTOR DOUBLE A statistic measuring the "clustering" of the index keys with regard to data partitions. This field holds a number between zero and one, with one representing perfect clustering and zero representing no clustering.
CLUSTERFACTOR DOUBLE Finer measurement of degree of clustering, or -1 if detailed index statistics have not been gathered or if the index is defined on a nickname.
USERDEFINED SMALLINT Defined by the user.
SYSTEM_REQUIRED SMALLINT 1 if one or the other of the following conditions is met:This index is required for a primary or unique key constraint, or this index is a dimension block index or composite block index for a multi-dimensional clustering (MDC) table.This is an index on the (OID) column of a typed table.2 if both of the following conditions are met:This index is required for a primary or unique key constraint, or this index is a dimension block index or composite block index for an MDC table.This is an index on the (OID) column of a typed table.0 otherwise.
CREATE_TIME TIMESTAMP Time when the index was created.
STATS_TIME TIMESTAMP Last time when any change was made to recorded statistics for this index. Null if no statistics available.
PAGE_FETCH_PAIRS VARCHAR(520) A list of pairs of integers, represented in character form. Each pair represents the number of pages in a hypothetical buffer, and the number of page fetches required to scan the table with this index using that hypothetical buffer. (Zero-length string if no data available.)
REMARKS VARCHAR(254) User-supplied comment, or null.
DEFINER VARCHAR(128) User who created the index.
CONVERTED CHAR(1) Reserved for future use.
SEQUENTIAL_PAGES BIGINT Number of leaf pages located on disk in index key order with few or no large gaps between them. (-1 if no statistics are available.)
DENSITY INTEGER Ratio of SEQUENTIAL_PAGES to number of pages in the range of pages occupied by the index, expressed as a percent (integer between 0 and 100, -1 if no statistics are available.)
FIRST2KEYCARD BIGINT Number of distinct keys using the first two columns of the index (-1 if no statistics or inapplicable)
FIRST3KEYCARD BIGINT Number of distinct keys using the first three columns of the index (-1 if no statistics or inapplicable)
FIRST4KEYCARD BIGINT Number of distinct keys using the first four columns of the index (-1 if no statistics or inapplicable)
PCTFREE SMALLINT Percentage of each index leaf page to be reserved during initial building of the index. This space is available for future inserts after the index is built.
UNIQUE_COLCOUNT SMALLINT The number of columns required for a unique key. Always <=COLCOUNT. < COLCOUNT only if there a include columns. -1 if index has no unique key (permits duplicates)
MINPCTUSED SMALLINT If not zero, then online index defragmentation is enabled, and the value is the threshold of minimum used space before merging pages.
REVERSE_SCANS CHAR(1) Y = Index supports reverse scans
N = Index does not support reverse scans
USE_INDEX CHAR(1) Y = index recommended or evaluated
N = index not to be recommended
R = an existing clustering RID index was recommended (by the Design Advisor) to be unclustered; this is the case when a new clustering RID index is recommended for the tableI = Ignore an existing non-unique index. The EXISTS column should be 'Y' in this case or the index will not be ignored.
CREATION_TEXT CLOB(2M) The SQL statement used to create the index.
PACKED_DESC BLOB(1M) Internal description of the table.
RUN_ID TIMESTAMP A value corresponding to the START_TIME of a row in the ADVISE_INSTANCE table, linking it to the same Design Advisor run.
INDEXTYPE VARCHAR(4) Type of index.
CLUS = Clustering
REG = Regular
DIM = Dimension block index
BLOK = Block index
EXISTS CHAR(1) Set to 'Y' if the index exists in the database catalog or 'N' if the index does not currently exist in the catalog.
RIDTOBLOCK CHAR(1) Set to 'Y' if the RID index was used to make a block index in the Design Advisor.
NULLKEYS CHAR(1) Specifies whether null keys are indexed.
N = Keys that contain all null values are not indexed (not considering columns or expressions from the INCLUDE clause)
Y = Keys that contain all null values are indexed (not considering columns or expressions from the INCLUDE clause)


2、
















你可能感兴趣的:(执行计划,db2,EXPLAIN)