Previous Topic: ALTER TABLE Statement for Adding a Default IndexNext Topic: Large Key Support


Additional Columns in Foreign Key Indexes

With previous versions of CA IDMS, an index used to enforce the integrity of an unlinked referential constraint contains only columns that make up the foreign key. With Version 18.0, you can add additional columns to your foreign key indexes. This can potentially reduce disk space requirements and improve your overall performance.

Extending foreign key indexes with additional columns allows you to use one index for multiple purposes. For example, the primary key in a table is often a concatenation of one of its foreign keys with additional columns that together form a unique identifier for each table row. You can now use a single index to enforce both the integrity of the referential constraint and the uniqueness of the primary key. By eliminating a second index, you reduce disk space requirements and the overhead associated with index maintenance.

Including extra columns in a foreign key index can also potentially improve access efficiency by enabling the use of more index scans to identify rows that match your selection criteria. Using an index scan can significantly reduce the number of I/Os necessary to satisfy a query.

To take advantage of this feature, define an index so that the foreign key columns precede any additional columns in your index key. As in earlier releases, the order of the foreign key columns in the index key must match the order of the referenced columns in some unique index or CALC key on the referenced table.