Optimizing grouping by using index skip key processing

Index Skip Key processing can be used when grouping with the keyed sequence implementation algorithm which uses an existing index. It is a specialized version of ordered grouping that processes very few records in each group rather than all records in each group.

The index skip key processing algorithm:

  1. Uses the index to position to a group and
  2. finds the first row matching the selection criteria for the group, and if specified the first non-null MIN or MAX value in the group
  3. Returns the group to the user
  4. "Skip" to the next group and repeat processing

This will improve performance by potentially not processing all index key values for a group.

Index skip key processing can be used: