Keyed Joins

A "full-keyed" JOIN uses the KEYED option and the joincondition must be based on key fields in the index. The join is actually done between the leftrecset and the index into the rightrecset--the index needs the dataset's record pointer (VIRTUAL(fileposition)) field to properly fetch records from the rightrecset. The typical KEYED join passes only the rightrecset to the TRANSFORM.

If the rightrecset is an INDEX, the operation is a "half-keyed" JOIN. Usually, the INDEX in a "half-keyed" JOIN contains "payload" fields, which frequently eliminates the need to read the base dataset. If this is the case, the "payload" INDEX does not need to have the dataset's record pointer (VIRTUAL(fileposition)) field declared. For a "half-keyed" JOIN the joincondition may use the KEYED and WILD keywords that are available for use in INDEX filters, only.

For both types of keyed join, any GROUPing and/or distribution of the base record sets is left untouched. See KEYED and WILD for a discussion of INDEX filtering.