Informix Error -844
-844 Statement is too long -- out of memory.
Informix SQL was unable to allocate a memory buffer large enough to hold this statement. Find a way to shorten the statement, or run it in two or more parts.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-844 fires when the interactive tool can't allocate a large enough memory buffer to hold a statement — per the official guidance, the documented fix is to shorten the statement or split it into parts.
- A very long, single statement (extensive generated SQL, a huge
INlist, deeply nested expressions) exceeding what the interactive tool's buffer can hold — the direct, common cause, similar in nature to -762's parser stack overflow but at the buffer-allocation level. - Limited available memory on the client machine, making even a moderately long statement exceed what can currently be allocated.
Solutions / Resolution
- Find a way to shorten the statement, per the official guidance — the same techniques
suggested for -762 apply here too (replacing long
ORchains withIN (...), for example). - Run it in two or more parts, per the official guidance, if the statement can be broken into separable pieces (staged through a temp table, for instance).
Examples
Splitting a long statement
-- Instead of one enormous statement combining many conditions:
SELECT * FROM orders WHERE order_id IN (1, 2, 3, /* ... thousands more ... */);
-- Stage the ID list into a temp table first, loaded separately, then join:
SELECT o.* FROM orders o, target_ids t WHERE o.order_id = t.order_id;
Diagnostic Checks
- Check the statement's actual length and look for opportunities to shorten it (replacing
long
OR/INlists, splitting into a staged multi-step process).
Related Errors / Related Topics
- -762 — "Stack overflow occurred during statement parse." A related statement-size limitation, at the SQL parser's internal stack rather than the interactive tool's buffer allocation.
- -801 — "SQL Edit buffer is full." A related interactive-editor memory limit, from accumulating multiple statements rather than one oversized one.
Shorten the statement (the same techniques as -762) or split it into parts, per the official guidance.