SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)
Name Resolution, Similarity Checks, and Automatic 
Recompilation
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
8-8
Similarity Checks and Automatic Recompilation
•
SQL/MP Object Names for an RDF Environment on page 8-8
•
SQL/MX Object Names for an RDF Environment on page 8-8
SQL/MP Object Names for an RDF Environment
When referring to SQL/MP objects in an embedded SQL program, use class MAP 
DEFINEs or SQL/MP aliases. See DEFINE Names for SQL/MP Objects on page 8-3 
and SQL/MP Aliases for SQL/MP Objects on page 8-2. If you refer to SQL/MP aliases 
in the program, use partially qualified names by omitting the catalog name. See 
SQL/MX Object Names for an RDF Environment on page 8-8.
If you use hard-coded Guardian names, omit the node name from the table name, 
letting the node default to the node on which the program is preprocessed. See 
Guardian Names for SQL/MP Objects on page 8-2.
SQL/MX Object Names for an RDF Environment
When referring to SQL/MX objects in an embedded SQL program, use partially 
qualified names by omitting the catalog name (for example, sch.tab or tab). See 
ANSI Names for SQL/MX Objects on page 8-2.
Do not embed DECLARE, SET, or CONTROL QUERY DEFAULT statements that 
qualify the object names. Instead, qualify the object names with the preprocessor 
options for catalog and schema during preprocessing. For more information, see 
Running the SQL/MX C/C++ Preprocessor on page 15-8 and Running the 
SQL/MX COBOL Preprocessor on page 16-9.
Similarity Checks and Automatic 
Recompilation 
This subsection explains what causes similarity checks and automatic recompilation to 
occur and how to control these operations by coding CONTROL QUERY DEFAULT 
statements in a program. See these topics:
•
Similarity Check on page 8-8
•
Automatic Recompilation on page 8-12
•
Recommended Recompilation Settings for OLTP Programs on page 8-13
Similarity Check
During a similarity check, the SQL/MX executor checks each table in a DML statement 
at run time to determine if the query execution plan of the statement is still operable. A 
similarity check is faster than the automatic recompilation of a query execution plan 
and can reduce the performance costs of automatic recompilation.
If the statement fails the Similarity Check Criteria (or if the similarity check is disabled), 
the SQL/MX executor, by default, invokes the SQL/MX compiler to automatically 










