All Products
Search
Document Center

PolarDB:REBUILD PARTITION

Last Updated:Mar 25, 2024

This topic describes how to rebuild a partition that contains subpartitions.

Syntax

The ALTER TABLE ... REBUILD PARTITION statement is used to rebuild a partition that contains subpartitions.

ALTER TABLE table_name REBUILD PARTITION {partition_names | ALL}

Parameters

Parameter

Description

table_name

The name (optionally schema-qualified) of the partitioned table.

partition_name

The name of the partition.

Examples

Rebuild the m3 partition of the sales_range_list table:

ALTER TABLE sales_range_list REBUILD PARTITION m3;