SQL/MP Programming Manual for COBOL

Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for COBOL529758-003
6-34
Running the SQL Compiler in the Guardian
Environment
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, therefore reusing the existing execution
plan.
If the similarity check fails, the SQL executor considers the plan to be
inoperable. The SQL executor then recompiles (in memory only) the SQL
statement that generated the inoperable plan (if NORECOMPILE is not
specified) and executes the recompiled statement.
During explicit SQL compilation, the CHECK INOPERABLE 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).