SQL Supplement for H-Series RVUs
SQL/MP Programming Manual for COBOL
HP NonStop SQL Supplement for H-Series RVUs—529446-005
1-45
Running the SQL Compiler
If you specify the CHECK INVALID PLANS or CHECK INOPERABLE PLANS
option (which stores similarity information in the program file), the SQL compiler
sets the program’s PFV and PCV to 310 (or later). To support these options, an
SQL catalog must have a catalog version of 310 (or later).
If you restore a program using the SQLCOMPILE option, the RESTORE program
invokes the recompilation of the program by using the SQLCOMP CHECK option
specified during the last explicit SQL compilation.
INVALID PROGRAM
specifies that the SQL executor should automatically recompile all SQL
statements in an invalid program or a program that references changed
DEFINEs (if NORECOMPILE is not specified). The SQL executor does not
attempt to execute any plans in the program without recompiling them.
CHECK INVALID PROGRAM is the default.
INVALID PLANS
specifies that the SQL executor should automatically recompile an SQL
statement if either of these conditions occur (and NORECOMPILE is not
specified):
•
The statement is invalid. Invalid statements have plans that fail the
redefinition timestamp.
•
The statement references a DEFINE at SQL load time that has changed
since the last explicit SQL compilation.
The SQL executor reuses the execution plans from the program file for the
other SQL statements, which have valid plans and unchanged DEFINE values.
During explicit SQL compilation, the CHECK INVALID PLANS option directs
the SQL compiler to store similarity information in the program file (even if the
similarity check is not enabled for the table or protection view).
INOPERABLE PLANS
specifies that the SQL executor should perform the similarity check on each
SQL object in an SQL statement if the similarity check is enabled for
referenced tables and protection views and either of these conditions occur:
•
The statement is invalid. Invalid statements have plans that fail the
redefinition timestamp.
•
The statement references a DEFINE at SQL load time that has changed
since the last explicit SQL compilation.
If the similarity check passes, the SQL executor considers the plan to be
operable (although it might not be optimal) and executes the SQL statement
without automatically recompiling it, thus reusing the existing execution plan.










