Indexes in the system tables

Information on indexes is in the system tables SYSINDEX, SYSIQINDEX, SYSIXCOL, and for join indexes, SYSIQJINDEX. See the Sybase IQ Reference Manual for a description of these tables.

Displaying indexes using stored procedures

You can also use the stored procedure sp_iqindex to display a list of indexes and information about them. For example, to list the indexes in the department table, issue the command:

sp_iqindex 'department'

The following information displays.

table_name

table_

owner

column_name

index_

type

index_name

unique_

index

remarks

department

DBA

dept_head_id

FP

ASIQ_IDX_T201_C3_FP

N

(NULL)

department

DBA

dept_id

FP

ASIQ_IDX_T201_C1_FP

N

(NULL)

department

DBA

dept_id

HG

ASIQ_IDX_T201_C1_HG

U

(NULL)

department

DBA

dept_name

FP

ASIQ_IDX_T201_C2_FP

N

(NULL)

If you omit the table name from the command, sp_iqindex displays this information for all tables in the database.