SQLSTATISTICS

The SQLSTATISTICS view contains statistic information about a table.

The following table describes the columns in the view:

Table 1. 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 DBCLOB(2097152) CCSID 1200

Nullable

If the key column is an expression, contains the expression. Contains the column name if the key column is not an expression.

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 BIGINT

Nullable

Reserved. Contains the null value.
PAGES BIGINT

Nullable

Reserved. Contains the null value.
FILTER_CONDITION DBCLOB(2097152) CCSID 1200

Nullable

Indicates whether the index is a sparse index.
search-condition
This is an SQL index with a WHERE clause.
empty-string
This is a DDS-created select/omit index.

Contains the null value if the TYPE is 0 or this is not a sparse index.

Start of changeI_INDEXTYPEEnd of change Start of changeINTEGER End of change Start of changeContains the type of the index.
0
The TYPE is 0.
1
The index is a PRIMARY KEY or keyed physical file.
2
The index is an SQL index.
3
The index is a keyed logical file.
4
The index is a UNIQUE or REFERENTIAL constraint.
End of change