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-13
Recommended Recompilation Settings for OLTP
Programs
To return recompilation warning messages directly to the program, use a CONTROL 
QUERY DEFAULT statement with the RECOMPILATION_WARNINGS option set to 
ON:
CONTROL QUERY DEFAULT RECOMPILATION_WARNINGS 'ON';
If the similarity check fails and RECOMPILATION_WARNINGS is ON, the SQL/MX 
executor returns warning message 8579 to the program. If a DML statement is 
automatically recompiled and RECOMPILATION_WARNINGS is ON, the SQL/MX 
executor returns warning message 8576 to the program.
Recommended Recompilation Settings for OLTP Programs
For optimal performance of OLTP programs in a production environment, use these 
settings:
A similarity check is faster than automatic recompilation and can reduce the 
performance costs of automatic recompilation. Therefore, you should enable similarity 
checks for OLTP programs.
Because automatic recompilation incurs a performance cost, it is unsuitable for OLTP 
programs and should be disabled. If you allow automatic recompilations but control the 
database environment to prevent them from occurring, you should monitor the EMS log 
for warning events that indicate that an automatic recompilation has occurred. You can 
also turn on the RECOMPILATION_WARNINGS option to report recompilation warning 
messages directly to the program when they occur.
For more information, see Similarity Check on page 8-8 and Automatic Recompilation 
on page 8-12.
Default Attribute Value
SIMILARITY_CHECK ON
RECOMPILATION_WARNINGS OFF
AUTOMATIC_RECOMPILATION OFF










