Range-list index scan (ACCESSTYPE='NR')

Range-list index scans are a method for simplifying the processing of OR predicates that can be mapped to a single index. This access type improves the performance of applications with data-dependent pagination.

When your SELECT statement contains an OR predicate, Db2 can use a range-list index scan and avoid scanning the index multiple times. A single index scan consumes fewer RID list resources and reduces CPU overhead than multiple index scans.

Db2 can use a range-list index scan when the SELECT statement meets the following requirements:

  • Every OR predicate refers to the same table.
  • Every OR predicate has at least one matching predicate.
  • Every OR predicate is mapped to the same index.
Exception: Db2 does not support range-list index scans for statements that use rowset cursors.

The following SELECT statement can take benefit from range-list index scan access:

SELECT * FROM EMP
WHERE (LASTNAME='JONES' AND FIRSTNAME='WENDY') OR
(LASTNAME='SMITH' AND FIRSTNAME='JOHN');