INDEXFIELDS System Table Description

Description

Information about the fields in all the indexes on persistent tables in the database.

Fields

Field Type Description

INDEXNAME

string

Name of the index (this may be NuoDB-generated)

SCHEMA

string

Schema containing the table containing the field on which this index exists.

TABLENAME

string

Table containing the field on which this index exists.

FIELD

string

Name of field on which this index exists.

POSITION

integer

Position of this field in the definition of the index.

PARTIAL

integer

Not used.

RECORDS_PER_VALUE

integer

Not used.

Indexes

Primary Index: INDEXFIELDS..PRIMARY_KEY on fields: SCHEMA, TABLENAME, INDEXNAME, FIELD
Secondary Index: INDEXFIELDS_TABLE on fields: SCHEMA, TABLENAME

Example

Using the same Example as above for SYSTEM.INDEXES (INDEXES System Table Description), we see one entry for the HOCKEY..PRIMARY_KEY and three entries, one for each field, for the PLAYER_IDX index.

SELECT * FROM system.indexfields WHERE tablename='HOCKEY';

     INDEXNAME       SCHEMA  TABLENAME  FIELD  POSITION  PARTIAL  RECORDS_PER_VALUE
 ------------------- ------- ---------- ------ --------- -------- ------------------
 HOCKEY..PRIMARY_KEY HOCKEY  HOCKEY     ID        0       <null>       <null>
 PLAYER_IDX          HOCKEY  HOCKEY     NUMBER    0       <null>       <null>
 PLAYER_IDX          HOCKEY  HOCKEY     NAME      1       <null>       <null>
 PLAYER_IDX          HOCKEY  HOCKEY     TEAM      2       <null>       <null>