SQL/MP Programming Manual for C
Program Invalidation and Automatic SQL 
Recompilation
HP NonStop SQL/MP Programming Manual for C—429847-008
8-11
Preventing Automatic Recompilations
table-name or view-name
is the Guardian name or DEFINE name of the table or protection view. The name 
cannot be a shorthand view. For the ALTER TABLE statement with the 
SIMILARITY CHECK clause, table-name cannot be an SQL catalog table. 
SIMILARITY CHECK ENABLE | DISABLE 
enables or disables the similarity check for the specified table or protection view. 
DISABLE is the default. 
For the complete syntax of these statements, see the SQL/MP Reference Manual.
If you use the ALTER TABLE or ALTER VIEW statement to change the similarity check 
attribute, the SQL catalog manager invalidates any programs, as identified in the 
USAGES table, that reference the table or protection view. If the ALTER TABLE or 
ALTER VIEW statement sets the similarity check attribute to its current value, 
programs are not invalidated. 
If you enable the similarity check for a protection view, the operation does not enable 
the check for any underlying tables. You must explicitly enable the similarity check for 
the underlying table. If you enable the similarity check for an underlying table, the 
operation does not enable the check for a protection view defined on the table. 
The SIMILARITYCHECK column in the TABLES table indicates whether a table or 
protection view has the similarity check enabled:
A table or protection view that has the similarity check enabled is version 310 (or later). 
All SQL/MP components, including the executor, catalog manager, and compiler, must 
be version 310 (or later) to access the table or protection view. An SQL catalog that 
supports the similarity check must have a catalog version of 310 (or later). For more 
information, see the SQL/MP Version Management Guide.
Similarity Rules for Tables
For two tables to be similar, the characteristics and attributes of the tables must be the 
same, except for the following listed differences. These tables are used to describe 
these differences: 
COMPILE-TIME-TABLE is the table SQLCOMP uses to generate the execution 
plan during explicit SQL compilation. COMPILE-TIME-TABLE must have the 
similarity check enabled for the COMPILE INOPERABLE PLANS option. (If the 
similarity check is not enabled for COMPILE-TIME-TABLE, the CHECK 
INOPERABLE PLANS option returns SQL warning 4315.) 
RUN-TIME-TABLE is the table the program accesses at run time. 
RUN-TIME-TABLE must have the similarity check enabled for the CHECK 
ENABLED The similarity check is enabled. 
DISABLED The similarity check is disabled. 










