RDB$INDICES

From InterBase

Go Up to System Tables


RDB$INDICES defines the index structures that allow InterBase to locate rows in the database more quickly. Because InterBase provides both simple indexes (a single-key column) and multi-segment indexes (multiple-key columns), each index defined in this table must have corresponding occurrences in the RDB$INDEX_SEGMENTS table.

RDB$INDICES
Column name Data type Length Description

RDB$INDEX_NAME

CHAR

67

Names the index being defined; if the value of this column changes, change its value in the RDB$INDEX_SEGMENTS table.

RDB$RELATION_NAME

CHAR

67

Names the table associated with this index; the table must be defined in the RDB$RELATIONS table.

RDB$INDEX_ID

SMALLINT

Contains an internal identifier for the index being defined; do not write to this column.

RDB$UNIQUE_FLAG

SMALLINT

Specifies whether the index allows duplicate values.

Values:

  • 0 - allows duplicate values
  • 1 - does not allow duplicate values

Eliminate duplicates before creating a unique index.

RDB$DESCRIPTION

BLOB

Subtype Text: User-written description of the index.

RDB$SEGMENT_COUNT

SMALLINT

Number of segments in the index; a value of 1 indicates a simple index.

RDB$INDEX_INACTIVE

SMALLINT

Indicates whether the index is:

  • Active (value of 0)
  • Inactive (value of 1)

This is not set for system tables.

RDB$INDEX_TYPE

SMALLINT

Contains an internal identifier for sort order, either ascending (ASC) or descending (DESC):

  • ASC (value of 0)
  • DESC (value of 1)

RDB$FOREIGN_KEY

CHAR

67

Name of FOREIGN KEY constraint for which the index is implemented.

RDB$SYSTEM_FLAG

SMALLINT

Indicates whether the index is:

  • User-defined (value of 0)
  • System-defined (value greater than 0)

RDB$EXPRESSION_BLR

BLOB

Subtype BLR: Contains the BLR (Binary Language Representation) for the expression, evaluated by the database at execution time; used for PC semantics.

RDB$EXPRESSION_SOURCE

BLOB

Subtype Text: Contains original text source for the column; used for PC semantics.

RDB$STATISTICS

DOUBLE<br/> PRECISION

Selectivity factor for the index; the optimizer uses index selectivity, a measure of uniqueness for indexed columns, to choose an access strategy for a query.

RDB$INDEX_SPLIT_NULL

SMALLINT

Indicates if index should store NULL keys in different buckets.