SQL statement cache qualifying criteria

A statement that can be cached in the SQL statement cache (and consequently, one that can match a statement that already appears in the SQL statement cache) must meet specified conditions.

To quality for caching, the statement must meet all of the following conditions:
  • It must be a SELECT, INSERT, UPDATE, or DELETE statement.
  • It must contain only non-opaque built-in data types (excluding BLOB, BOOLEAN, BYTE, CLOB, LVARCHAR, and TEXT).
  • It must contain only built-in operators.
  • It cannot contain user-defined routines.
  • It cannot contain temporary or remote tables.
  • It cannot contain subqueries in the Projection list.
  • It cannot be part of a multistatement PREPARE.
  • It cannot have user-privilege restrictions on target columns.
  • In an ANSI-compliant database, it must contain fully qualified object names.
  • It cannot require re-optimization.