INDEXES Rowset

The INDEXES rowset identifies the indexes defined in the catalog that are owned by a given user.

The INDEXES rowset contains the following columns:

Column name Type indicator Description
TABLE_CATALOG DBTYPE_WSTR Catalog name. NULL if the provider does not support catalogs.
TABLE_SCHEMA DBTYPE_WSTR Unqualified schema name. NULL if the provider does not support schemas.
TABLE_NAME DBTYPE_WSTR Table name.
INDEX_CATALOG DBTYPE_WSTR Catalog name. NULL if the provider does not support catalogs.
INDEX_SCHEMA DBTYPE_WSTR Unqualified schema name. NULL if the provider does not support schemas.
INDEX_NAME DBTYPE_WSTR Index name.
PRIMARY_KEY DBTYPE_BOOL Whether the index represents the primary key on the table. NULL if this is not known.
UNIQUE DBTYPE_BOOL Specifies whether index keys must be unique, that is:
  • VARIANT_TRUE, which indicates that the index keys must be unique.

  • VARIANT_FALSE, which indicates that duplicate keys are allowed.
CLUSTERED DBTYPE_BOOL Specifies whether an index is clustered, that is:
  • VARIANT_TRUE, which indicates that the leaf nodes of the index contain full rows, not bookmarks. This is a way to represent a table clustered by key value.

  • VARIANT_FALSE, which indicates that the leaf nodes of the index contain bookmarks of the base table rows whose key value matches the key value of the index entry.
TYPE DBTYPE_UI2 Specifies the type of the index, that is:
  • DBPROPVAL_IT_BTREE, which indicates that the index is a B+-tree.

  • DBPROPVAL_IT_HASH, which indicates that the index is a hash file using, for example, linear or extensible hashing.

  • DBPROPVAL_IT_CONTENT, which indicates that the index is a content index.

  • DBPROPVAL_IT_OTHER, which indicates that the index is some other type of index.
FILL_FACTOR DBTYPE_I4 For a B+-tree index, this property represents the storage use factor of page nodes during the creation of the index. The value is an integer from 1 to 100 representing the percentage of use of an index node. For a linear hash index, this property represents the storage use of the entire hash structure (the ratio of used area to total allocated area) before a file structure expansion occurs.
INITIAL_SIZE DBTYPE_I4 Specifies whether null keys are allowed, that is:
  • DBPROPVAL_IN_DISALLOWNULL, which indicates that the index does not allow entries where the key columns are NULL. If the consumer attempts to insert an index entry with a NULL key, then the provider returns an error.

  • DBPROPVAL_IN_IGNORENULL, which indicates that the index does not insert entries containing NULL keys. If the consumer attempts to insert an index entry with a NULL key, then the provider ignores that entry and no error code is returned.

  • DBPROPVAL_IN_IGNOREANYNULL, which indicates that the index does not insert entries where some column key has a NULL value. For an index, that has a multicolumn search key, if the consumer inserts an index entry with NULL value in some column of the search key, then the provider ignores that entry and no error code is returned.
SORT_BOOKMARKS DBTYPE_BOOL Specifies how the index treats repeated keys, that is:
  • VARIANT_TRUE, which indicates that the index sorts repeated keys by bookmark.

  • VARIANT_FALSE, which indicates that the index does not sort repeated keys by bookmark.
AUTO_UPDATE DBTYPE_BOOL Specifies whether the index is maintained automatically when changes are made to the corresponding base table, that is:
  • VARIANT_TRUE, which indicates that the index is automatically maintained.

  • VARIANT_FALSE, which indicates that the index must be maintained by the consumer through explicit calls to IRowsetChange. It is the consumer’s responsibility to ensure that consistency of the index is a result of updates to the associated base table.
NULL_COLLATION DBTYPE_I4 Specifies how NULLs are collated in the index, that is, one of:
  • DBPROPVAL_NC_END, which indicates that NULLs are collated at the end of the list, regardless of the collation order.

  • DBPROPVAL_NC_START, which indicates that NULLs are collated at the start of the list, regardless of the collation order.

  • DBPROPVAL_NC_HIGH, which indicates that NULLs are collated at the high end of the list.

  • DBPROPVAL_NC_LOW, which indicates that NULLs are collated at the low end of the list.
ORDINAL_POSITION DBTYPE_UI4 Ordinal position of the column in the index, starting with one.
COLUMN_NAME DBTYPE_WSTR Column name. The column, together with the COLUMN_GUID and COLUMN_PROPID columns, forms the column ID. One or more of these columns will be NULL depending on which elements of the DBID structure the provider uses.
COLUMN_GUID DBTYPE_GUID Column GUID.
COLUMN_PROPID DBTYPE_UI4 Column property ID.
COLLATION DBTYPE_I2 Specifies values as one of:
  • CB_COLLATION_ASC, which indicates that the sort sequence for the column is ascending.

  • DB_COLLATION_DESC, which indicates that the sort sequence for the column is descending.

  • NULL, which indicates that a column sort sequence is not supported.
CARDINALITY DBTYPE_I4 Number of unique values in the index.
PAGES DBTYPE_I4 Number of pages used to store the index.
FILTER_CONDITION DBTYPE_WSTR The WHERE clause identifying the filtering restriction.

Default Sort Order: UNIQUE_TYPE, INDEX_CATALOG, INDEX_SCHEMA, INDEX_NAME, ORDINAL_POSITION.