分区表exchange 实验

Exchange Partitions

Note:

Exchange partitions only work between a partition and a temporary table.


如果分区表要转换到分区表需要一个普通临时表。

Cureent 分区表到 Archival 分区表的思路如下:



需要注意的是:

  1. 索引的维护  UPDATE INDEXES
  2. 添加新的分区在历史分区表 Archival partition table 根据 current Partition table
  3. Archival partition table must have the same data structure and index (like column name, partition column, high value and so on) with current Partition table, but archival partition table shouldn't have the feature ——automatic adding partition
  4. exchange commands  slightly different between normal partitioned table and composite-partitioned table
  5. add parition into composite-partitioned table, the subpartitions will be added automaticaly 

ALTER  TABLE T_NOMAL_PARTITION EXCHANGE PARTITION SYS_P2652 WITH TABLE T_NOMAL_PARTITION_TEMP UPDATE INDEXES;


ALTER  TABLE T_NOMAL_PARTITION_ARCH EXCHANGE PARTITION SYS_P2652 WITH TABLE T_NOMAL_PARTITION_TEMP UPDATE INDEXES;




ALTER  TABLE T_COMP_PARTITION EXCHANGE subpartition SYS_P265_H WITH TABLE T_COMP_PARTITION_TEMP UPDATE INDEXES;
ALTER  TABLE T_COMP_PARTITION_ARCH EXCHANGE subpartition SYS_P265_H WITH TABLE T_COMP_PARTITION_TEMP UPDATE INDEXES;



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值