Help Center/ GaussDB/ Centralized_8.x/ Partitioned Table/ Partitioned Table O&M Management/ MOVE PARTITION/ Moving Level-2 Partitions for a Level-2 Partitioned Table
Updated on 2024-06-07 GMT+08:00

Moving Level-2 Partitions for a Level-2 Partitioned Table

You can run ALTER TABLE MOVE SUBPARTITION to move level-2 partitions in a level-2 partitioned table.

For example, move the partition date_202001_channel1 from the level-2 partitioned table range_list_sales to the tablespace tb1 by specifying the partition name.
ALTER TABLE range_list_sales MOVE SUBPARTITION date_202001_channel1 TABLESPACE tb1;
Alternatively, move the partition corresponding to the partition value ('2020-01-08', '0') from the level-2 partitioned table range_list_sales to the tablespace tb1.
ALTER TABLE range_list_sales MOVE SUBPARTITION FOR ('2020-01-08', '0') TABLESPACE tb1;