Program Invalidation and Automatic SQL
Recompilation
HP NonStop SQL/MP Programming Manual for C—429847-008
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–However, if 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
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 LOCKLENGTH
SECURE
AUDITCOMPRESS MAXEXTENTS
SERIALWRITES
BUFFERED NOPURGEUNTIL
TABLECODE
CLEARONPURGE OWNER
VERIFIEDWRITES
EXTENT (primary and secondary)
Summary of Contents for NonStop SQL/MP
Page 4: ......
Page 14: ...Contents HP NonStop SQL MP Programming Manual for C 429847 008 x ...
Page 60: ...Host Variables HP NonStop SQL MP Programming Manual for C 429847 008 2 26 VARCHAR Data Type ...
Page 294: ...SQL MP Sample Database HP NonStop SQL MP Programming Manual for C 429847 008 A 6 ...