Using indexes and sort sequence with ordering

Unless the optimizer chooses a sort to satisfy the ordering request, the index sort sequence table must match the query sort sequence table.

When a sort is used, the translation is done during the sort. Since the sort is handling the sort sequence requirement, this technique allows Db2 for i to use any existing index that meets the selection criteria.