Index access for UPDATE

Db2 can always use an index for a UPDATE operation when no index key columns are updated. Db2 can sometimes use an index when key columns are updated, but only when certain conditions are met.

Introductory concepts
The following conditions must be met to enable Db2 to use an index for an UPDATE operation when index key columns are being updated:
  • The UPDATE statement contains a corresponding predicate in one of the following forms, for each updated index key column:
    • index-key-column = constant
    • index-key-column IS NULL
  • If a view is involved, WITH CHECK OPTION is not specified.