Finding Out Which Indexes Are Used
To find out which index Progress uses for a particular query, use the XREF option in the COMPILE statement. The SEARCH lines in the XREF output file show the indexes that are accessed for every record selection statement.
Table 5–1 is a list of tags the XREF compile option generates:
Table 5–1: XREF tags
Tag
|
Meaning
|
SEARCH
|
Indicates an index bracket or look up will be used. The logical database name, table name, and index names are listed. When multiple brackets and indexes are used for the same query, you will see one search line for each bracket.
|
SEARCH ... WHOLE-INDEX
|
Indecates that a suitable bracket could not be constructed and an index scan over the entire table will be performed using the index noted.
|
SORT-ACCESS
|
Indicates that the query result is to be ordered by a particular column value and no suitable index exists. A sort of the query result on the noted column value is required.
|
ACCESS
|
Indicates that the specified table and field value is used at this point in the program.
|
CREATE
|
Indicates that a record is created at this location in the program.
|
DELETE
|
Indicates that a record is deleted at this location in the program.
|
UPDATE
|
Indicates that the specified field value of a table is updated at this location in the program.
|
An alternative method to determine index usage is to use the index statistics virtual system table. The startup parameters that enable this are described in Chapter 4 of the Progress Database Administration Guide and Reference
.