SQL/MP Installation and Management Guide
Managing Database Applications
HP NonStop SQL/MP Installation and Management Guide—523353-004
10-26
Enabling the Similarity Check for Tables and
Protection Views
If the program has not been previously compiled or does not contain similarity 
information, the COMPILE INOPERABLE PLANS option directs the SQL compiler 
to compile all SQL statements in the program. 
New Indexes
If you add any new indexes, you might decide to explicitly SQL compile the program 
with the COMPILE INVALID PLANS option. The SQL compiler then recompiles the 
SQL statements that refer to the tables affected by the new indexes. Consequently, the 
compiler might generate new and more efficient execution plans that use the new 
indexes. 
New SQL Compiler Version
If you have installed a new version of the SQL compiler since the last explicit 
compilation, you might decide to explicitly SQL compile the program with the COMPILE 
PROGRAM STORE SIMILARITY INFO option. The SQL compiler recompiles all SQL 
statements and stores similarity information in the program file. Also, the new compiler 
might generate more efficient execution plans. 
Enabling the Similarity Check for Tables and Protection Views 
You must explicitly enable the similarity check for a table or protection view (including 
any underlying tables for the view) to use these options. (SQL implicitly enables the 
similarity check for other SQL objects.)
•
CHECK options: To use the CHECK INOPERABLE PLANS option, the similarity 
check must be enabled for any tables or protection views referenced at run time. 
•
COMPILE options: To use the COMPILE INOPERABLE PLANS option, the 
similarity check must be enabled for any tables or protection views referenced 
during explicit SQL compilation. 
To enable or disable the similarity check for a table or protection view, specify the 
SIMILARITY CHECK clause in the CREATE or ALTER TABLE or VIEW statements. 
For the complete syntax of these statements, see the NonStop SQL/MP Reference 
Manual. 
Invalidation of Programs 
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 refer to 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. 










