Informix Error -5849: The sub-query flattening settings for the query plan and the current value of NO_SUBQF environment variable do not match.
Cause and resolution
The sub-query flattening settings for the query plan and the current value of NO_SUBQF environment variable do not match.
.PROBLEM The query plan was created with a different value of the NO_SUBQF environment variable than the current value of the NO_SUBQF environment variable. .ACTION Change the value of the NO_SUBQF environment variable or run UPDATE STATISTICS to recreate the routine query plan.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-5849 fires when a stored query plan was created under a different NO_SUBQF environment
variable value than the one currently in effect — per the official guidance.
NO_SUBQFchanged after the query plan was created, per the official guidance — the direct, only cause.
Solutions / Resolution
- Change the value of
NO_SUBQFback to match the one used when the plan was created, per the official guidance, or - Run
UPDATE STATISTICSto recreate the routine query plan, per the official guidance, under the currentNO_SUBQFvalue.
Examples
Recreating the plan after a NO_SUBQF change
UPDATE STATISTICS LOW FOR TABLE orders;
Diagnostic Checks
- Check the current
NO_SUBQFenvironment variable value, and compare it against the value used when the routine query plan was last created; align them or refresh the plan.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -5849 in this set yet.
A query plan's sub-query flattening setting doesn't match the current NO_SUBQF value —
change NO_SUBQF back, or run UPDATE STATISTICS to recreate the plan.