I would like to move from Range Partition to Range-Interval, but my current table has a partition on MAXVALUE
and the column used for partitioning allows null values :(
E.g.: Say we have:
create table a (b number)
partition by range (b) (
PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN (50),
PARTITION p2 VALUES LESS THAN (MAXVALUE)
);
Then we populate:
INSERT INTO a(b) VALUES (1);
INSERT INTO a(b) VALUES (11);
INSERT INTO a(b) VALUES (51);
INSERT INTO a(b) VALUES (null);
To be able to move to interval, we need to remove the partition with MAXVALUE
, therefore, other values should be moved to a new partition.
51 is not a problem, I would create partition where with VALUES LESS than 100
, but what about NULL
ones?
I was thinking about changing to something like partition by range (NVL(b,0))
, but I am scared about that having to reprocess the whole table (not possible, real table has a lot of data).
Any idea?