Moves a partition or subpartition to a different tablespace.
Important
PolarDB uses a shared distributed storage architecture where multiple compute nodes share a single copy of data. Physical tablespaces are not supported. ALTER TABLE MOVE PARTITION is accepted for Oracle compatibility only — it does not change the data's physical storage location.
Prerequisites
Before you begin, ensure that you have:
Table ownership or the
ALTERpermission on the target table
Synopsis
ALTER TABLE MOVE PARTITION has two forms.
Move a partition to a new tablespace:
ALTER TABLE table_name
MOVE PARTITION partition_name
TABLESPACE tablespace_name;Move a subpartition to a new tablespace:
ALTER TABLE table_name
MOVE SUBPARTITION subpartition_name
TABLESPACE tablespace_name;Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
table_name | Yes | The name of the table that contains the partition. | archived_logs |
partition_name | Yes | The name of the partition to move. | p_2022_q1 |
subpartition_name | Yes | The name of the subpartition to move. | sp_2023_asia |
tablespace_name | Yes | The name of the destination tablespace. | tbs_cold_data |