DB2 Universal Database for iSeries SQL Reference

SQLSTATISTICS

The SQLSTATISTICS view contains statistic information on a table. The following table describes the columns in the view:

Table 144. SQLSTATISTICS view

Column Name Data Type Description
TABLE_CAT VARCHAR(128) Relational database name
TABLE_SCHEM VARCHAR(128) Name of the SQL schema of the table.
TABLE_NAME VARCHAR(128) Name of the table.
NON_UNIQUE SMALLINT
Nullable
Indicates whether an index prohibits duplicate keys on the table.

Contains the null value if the TYPE is 0.

INDEX_QUALIFIER VARCHAR(128)
Nullable
Name of the schema of the index.

Contains the null value if the TYPE is 0.

INDEX_NAME VARCHAR(128)
Nullable
Name of the index.

Contains the null value if the TYPE is 0.

TYPE SMALLINT Indicates the type of information returned:

0
The number of rows in the table.

3
An index on the table.
ORDINAL_POSITION SMALLINT
Nullable
Indicates the ordinal position of the key in the index.

Contains the null value if the TYPE is 0.

COLUMN_NAME VARCHAR(128)
Nullable
Name of the column for a key in the index.

Contains the null value if the TYPE is 0.

ASC_OR_DESC CHAR(1)
Nullable
Order of the column in the key:

A
Ascending

D
Descending

Contains the null value if the TYPE is 0.

CARDINALITY INTEGER
Nullable
Reserved. Contains the null value.
PAGES INTEGER
Nullable
Reserved. Contains the null value.
FILTER_CONDITION VARCHAR(128)
Nullable
Indicates whether the index is a select/omit index.

empty-string
This is a select/omit index.

Contains the null value if the TYPE is 0 or this is not a select/omit index.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]