Invalidation of cached dynamic statements

Various actions and events can invalidate statements in the dynamic statement cache. Db2 uses the full prepare process to generate new access paths for invalid cached dynamic SQL statements.

For example, the following actions can invalidate cached dynamic statements, among others:

  • Changing objects referenced by the statement by issuing ALTER, REVOKE, or DROP statements.
  • Start of changeCollecting statistics for objects referenced by the statement with the RUNSTATS utility or inline in other utilities with the INVALIDATECACHE YES option.End of change