Bidirectional indexes

Bidirectional indexes allow scans in both the forward and reverse directions.

The ALLOW REVERSE SCANS clause of the CREATE INDEX statement enables both forward and reverse index scans. That is, in the order that is defined at index creation time and in the opposite, or reverse order. With this option, you can:
  • facilitate MIN and MAX functions.
  • fetch previous keys.
  • eliminate the need for the database manager to create a temporary table for the reverse scan.
  • eliminate redundant reverse order indexes.
If DISALLOW REVERSE SCANS is specified, the index cannot be scanned in reverse order. Physically, a DISALLOW REVERSE SCANS index is the same as an ALLOW REVERSE SCANS index.