Re-cluster data and reduce fragmentation
Move a partition to another tablespace
Modify create-time attributes
Store the data in compressed format using table compression
如:
ALTER TABLE parts MOVE PARTITION depot2
TABLESPACE ts094 NOLOGGING COMPRESS;
(如果指定compress,affects only future storage, but not existing data.)
同样,可用update indexes 来避免索引失效
11. 重命名分区(rename partition)
Alter table xxx rename partition/subpartition p1 to p1_new;
跟重命名表差不多。
12. 修改分区默认属性(modify default attributes)
修改表属性:alter table xxx modify default attributes …
修改分区属性(适用于组合分区):alter table xxx modify default attributes for partition p1 …
只对以后添加的分区产生影响,适用于所有分区,其中hash分区只能修改表空间属性。
如:
Alter table xxx modify default attributes tablespace users;
13. 修改子分区模板属性(set subpartition template)
Alter table xxx set subpartition template (…);
仅影响以后的子分区,当前的子分区属性不会改变
如:
Alter table xxx set subpartition template
(partition p1 tablespace tbs_1,
Partition p2 tablespace tbs_2);
如果要取消掉子分区模板:
Alter table xxx set subpartition template ();