Informix Error -25800: Cannot specify overlapping fragment expressions for interval or list fragmentation.
Cause and resolution
Cannot specify overlapping fragment expressions for interval or list fragmentation.
The fragment expressions for interval or list fragmentation cannot overlap. For example, the following statement generates an error:
CREATE TABLE address (street VARCHAR(128), city VARCHAR(32), state CHAR(2), zip INT) FRAGMENT BY RANGE(zip) INTERVAL(1000) STORE IN (dbs1, dbs2, dbs3) PARTITION p1 VALUES < 5000 IN dbs3, PARTITION p2 VALUES < 10000 IN dbs3, PARTITION p3 VALUES < 10000 IN dbs4;
The partition p2 and p3 are overlapping. The fragment expressions for p2 and p3 are the same.
The following statement also generates an error:
CREATE INDEX add_state_idx ON address(state) FRAGMENT BY LIST(state) PARTITION p1 VALUES ('CA','OR') IN dbs1, PARTITION p2 VALUES ('NY', 'NJ', 'CA') IN dbs2, PARTITION p3 VALUES (NULL) IN dbs3, PARTITION p4 REMAINDER IN dbs3;
The partition p1 and p2 are overlapping. The value 'CA' appears in both p1 and p2 partitions.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-25800 fires when two partitions in an interval/list FRAGMENT BY clause have overlapping
value ranges or lists — per the official guidance.
- Two
RANGE/LISTpartitions whose value expressions overlap, per the official guidance — the direct, only cause.
Solutions / Resolution
- Rewrite the partition boundaries/lists so no two partitions overlap, per the official guidance.
Examples
Overlapping RANGE partitions
CREATE TABLE address (street VARCHAR(128), city VARCHAR(32), state CHAR(2), zip INT)
FRAGMENT BY RANGE(zip) INTERVAL(1000) STORE IN (dbs1, dbs2, dbs3)
PARTITION p1 VALUES < 5000 IN dbs3,
PARTITION p2 VALUES < 10000 IN dbs3,
PARTITION p3 VALUES < 10000 IN dbs4;
-- -25800: p2 and p3 have the same upper bound
Overlapping LIST partitions
CREATE INDEX add_state_idx ON address(state)
FRAGMENT BY LIST(state)
PARTITION p1 VALUES ('CA','OR') IN dbs1,
PARTITION p2 VALUES ('NY','NJ','CA') IN dbs2,
PARTITION p3 VALUES (NULL) IN dbs3,
PARTITION p4 REMAINDER IN dbs3;
-- -25800: 'CA' appears in both p1 and p2
Diagnostic Checks
- Check each partition's value range/list against every other partition, and eliminate any overlap.
Related Errors / Related Topics
- -25801 — "Cannot specify a dbspace more than once in the STORE IN clause." A
related interval/list fragmentation syntax error, on
STORE INrather than overlapping partitions. - -25802 — "The PARTITION clause is mandatory for interval and list fragmentation." A
related interval/list fragmentation syntax error, on a missing
PARTITIONclause. - -25803 — "Interval or list fragmentation must have at least one non-null, non-remainder fragment." A related interval/list fragmentation requirement.
Two interval/list fragmentation partitions had overlapping value ranges or lists — eliminate the overlap.