SQL/MP Programming Manual for C
Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for C—429847-008
6-19
Running the SQL Compiler in the Guardian
Environment
CHECK INVALID PROGRAM
(the default) 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 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 check.
The statement references a DEFINE at SQL load time that has changed
since the last explicit SQL compilation.
The SQL executor uses the execution plans from the program file for other
SQL statements that are valid.
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).
CHECK 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 check.
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 runs the statement without
automatically recompiling it.
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 runs 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).