SQL/MP Programming Manual for COBOL

Program Invalidation and Automatic SQL
Recompilation
HP NonStop SQL/MP Programming Manual for COBOL529758-003
8-12
Preventing Automatic Recompilations
INOPERABLE PLANS option. Otherwise, the similarity check fails and automatic
recompilation occurs.
RUN-TIME-TABLE can be the same table as COMPILE-TIME-TABLE, a modified
version of COMPILE-TIME-TABLE, or a different table altogether.
For RUN-TIME-TABLE to be similar to COMPILE-TIME-TABLE, all characteristics and
attributes must be the same, except for these allowable differences:
Names of the tables.
Contents of the tables (that is, the data in the table).
Partitioning attributes (number of partitions and partitioning key ranges).
Number of indexes–RUN-TIME-TABLE must have all indexes used by
COMPILE-TIME-TABLE in the execution plan. RUN-TIME-TABLE can also have
additional indexes that COMPILE-TIME-TABLE does not have.
COMPILE-TIME-TABLE can have indexes that RUN-TIME-TABLE does not have
but only if the execution plan does not use the additional indexes.
Key tags (or values) for indexes.
Creation timestamp and redefinition timestamp.
AUDIT attribute–If, however, a statement performs a DELETE or UPDATE set
operation on a nonaudited table that has a SYNCDEPTH of 1, the SQL executor
returns an error and forces the automatic recompilation of the statement (if
NORECOMPILE is not specified).
Any of these file attributes:
Statistics on the tables.
Column headings.
Comments on columns, constraints, indexes, or tables.
Catalog where the table is registered.
Help text.
Number of columns–RUN-TIME-TABLE can have more columns than
COMPILE-TIME-TABLE, but the common columns of both tables must have
identical attributes. However, if a statement uses a SELECT list containing an
Note. The similarity check does not support parallel execution plans. Tables are not
considered similar if they are specified in a query that uses a parallel execution plan.
ALLOCATE
AUDITCOMPRESS
BUFFERED
CLEARONPURGE
EXTENT (primary and secondary
LOCKLENGTH
MAXEXTENTS
NOPURGEUNTIL
OWNER
SECURE
SERIALWRITES
TABLECODE
VERIFIEDWRITES