Updated on 2024-05-20 GMT+08:00

Merging Partitions for a Partitioned Table

You can run ALTER TABLE MERGE PARTITIONS to merge multiple partitions into one partition.

For example, merge the partitions date_202001 and date_202002 of the range partitioned table range_sales into a new partition and update the global index.
ALTER TABLE range_sales MERGE PARTITIONS date_202001, date_202002 INTO
    PARTITION date_2020_old UPDATE GLOBAL INDEX;

After interval partitions are merged, the interval partition before the merged partitions becomes a range partition.