Operating Condition
Syntax: SET FASTFK ON/OFF
Default: OFF
This setting, when on, permits R:BASE to operate a foreign key index using a condensed index for maintaining that foreign key. If the foreign key is not used for retrieving data or linking columns, a complete index is unnecessary and actually inhibits speed. When set to on, R:BASE creates a condensed index for any existing foreign keys.
To switch to condensed indexes on existing foreign keys, you need to run a PACK, PACK KEYS, or RELOAD command with FASTFK on; these actions cause R:BASE to rebuild the database with condensed foreign key indexes.
Keep in mind, however, that you might need complete indexes on foreign keys where such indexes are needed for retrieving data. Retaining a separate index on columns used in foreign keys that link tables is preferred. Indexes are also needed on foreign keys that you use for selecting column values; therefore, use the CREATE INDEX command to explicitly create indexes for columns used in foreign keys in a database where FASTFK is set on.
The command SHOW FASTFK displays the FASTFK state and whether FASTFK is operational in the current database. For example:
SHOW FASTFK
(FASTFK ) ON Use fast Foreign Key (FK) structures on rebuild.
OFF FASTFK setting for current database
Once you rebuild the keys in a database with the FASTFK setting on, SHOW FASTFK displays the following:
SHOW FASTFK
(FASTFK ) ON Use fast Foreign Key (FK) structures on rebuild
ON FASTFK setting for current database