This topic describes how to update statistics of partitions or subpartitions.
Syntax
The ALTER TABLE ... ANALYZE PARTITION statement is used to update statistics of partitions or subpartitions.
ALTER TABLE table_name
ANALYZE PARTITION {partition_names | ALL}
partition_names
is:{partition_name | subpartition_name}
Parameters
Parameter | Description |
table_name | The name (optionally schema-qualified) of the partitioned table. |
partition_name | The name of the partition. |
subpartition_name | The name of the subpartition. |
Examples
Update statistics of the
q1_2021
partition and the p5
subpartition of the sales_range_list
table:ALTER TABLE sales_range_list ANALYZE PARTITION q1_2021,p5;
Update statistics of the
p5
subpartition of the sales_range_list
table:ALTER TABLE sales_range_list ANALYZE PARTITION p5;