g2****@clarica.com (Richard DAddese) wrote in message news:<f9**************************@posting.google. com>...
Has anyone ever experienced a situation where DB2 EXPLAIN shows a
certain index being used, but when it executes, the index is not being
used and a tablespace scan occurs instead? The package was bound with
NOREOPT(VARS). Thanks.
Which OS ? IIRC - on DB2 z/OS (DB2/390 or DB2/MVS) this can happen if
DB2 chooses a LIST PREFETCH (which needs a RID Sort) and the sort can
not be done in main memory. If this happens then Index access will be
changed to a tablespace scan at runtime. (At least this was true in
DB2/MVS Version 5 or earlier).
HTH
Joachim