SQL/MP Installation and Management Guide
Managing Database Applications
HP NonStop SQL/MP Installation and Management Guide—523353-004
10-27
Enabling the Similarity Check for Tables and
Protection Views
Underlying Tables 
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. 
Collations 
You do not have to enable the similarity check for a collation, because collations 
always have the similarity check enabled. Collations are similar only if they are equal. 
SQL uses the CPRL_COMPAREOBJECTS_ procedure to compare the collations. 
Consequently, two tables that contain character columns associated with collations are 
similar only if the collations are equal. 
Similarity Rules for Tables 
There are two separate comparison situations that apply to similarity checking:
•
Static compilation, with previously compiled access to a table and a current 
compilation that accesses a table
•
Execution time, with previously compiled access to a table and current access to a 
table
For two tables to be similar, the characteristics and attributes of the tables must be the 
same except for a specific set of allowable differences, such as:
•
Names of the tables 
•
Contents of the tables (that is, the data in the table) 
•
Partitioning attributes (number of partitions and partitioning key ranges)
•
Number of indexes. RUN-TIME-TABLE must have all indexes used by 
COMPILE-TIME-TABLE in the execution plan. RUN-TIME-TABLE can also have 
additional indexes that COMPILE-TIME-TABLE does not have. 
COMPILE-TIME-TABLE can have indexes that RUN-TIME-TABLE does not have 
but only if the execution plan does not use the additional indexes. 
•
Key tags (or values) for indexes
•
Creation timestamp and redefinition timestamp
•
AUDIT attribute. If, however, a statement performs a DELETE or UPDATE set 
operation on a nonaudited table with a SYNCDEPTH of 1, the SQL executor 
returns an error and forces the automatic recompilation of the statement (if 
NORECOMPILE is not specified). 










