Informix Error -738: DROP DISTRIBUTIONS is only valid in LOW mode.
Cause and resolution
DROP DISTRIBUTIONS is only valid in LOW mode.
By default, LOW mode does not remove distributions, so you need to use the DROP DISTRIBUTIONS clause. To remove HIGH or MEDIUM distributions, use the DROP DISTRIBUTIONS clause.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-738 fires when DROP DISTRIBUTIONS is used with UPDATE STATISTICS MEDIUM/HIGH instead of
LOW — per the official guidance, LOW mode is where DROP DISTRIBUTIONS belongs: LOW mode
by default doesn't remove existing distributions on its own, so the DROP DISTRIBUTIONS clause
is how you explicitly remove them (regardless of whether those existing distributions were
originally built by an earlier MEDIUM or HIGH run) — the clause itself is only valid attached
to LOW mode.
DROP DISTRIBUTIONSattached toUPDATE STATISTICS MEDIUMorHIGH, per the official guidance — the direct, only cause; the clause needsLOWmode specifically.- A misunderstanding of what removes distributions, expecting
MEDIUM/HIGHmode combined withDROP DISTRIBUTIONSto both rebuild and clear distributions in one step, when the removal step itself always runs underLOWmode.
Solutions / Resolution
- Use
UPDATE STATISTICS LOW DROP DISTRIBUTIONS, per the official guidance, to remove existing distributions — regardless of whether they were originally built inMEDIUMorHIGHmode. - Follow with a separate
MEDIUM/HIGHrun, if new distributions are needed afterward, sinceDROP DISTRIBUTIONSunderLOWmode only removes them; it doesn't rebuild new ones in the same statement.
Examples
The disallowed attempt
UPDATE STATISTICS HIGH DROP DISTRIBUTIONS FOR TABLE orders;
-- -738: DROP DISTRIBUTIONS requires LOW mode
Corrected — drop first under LOW mode, then rebuild if needed
UPDATE STATISTICS LOW DROP DISTRIBUTIONS FOR TABLE orders;
UPDATE STATISTICS HIGH FOR TABLE orders;
Diagnostic Checks
- Check whether
DROP DISTRIBUTIONSis attached to aMEDIUM/HIGHmode statement, and move it to a separateLOW-mode statement instead.
Related Errors / Related Topics
- -736 — "The RESOLUTION and SAMPLING SIZE clauses are not valid for the LOW mode of the
UPDATE STATISTICS statement." A related mode/clause-compatibility restriction, going the other
direction — clauses that need
MEDIUM/HIGHrather thanLOW. - -737 — "The confidence value and the SAMPLING SIZE clause are not valid for the HIGH mode
of the UPDATE STATISTICS statement." A related mode/clause-compatibility restriction, for
HIGHmode specifically.
DROP DISTRIBUTIONS always runs under LOW mode, regardless of which mode originally built the
distributions being removed — follow it with a separate MEDIUM/HIGH run if new distributions
are needed.