range分区拆分

You split a range partition using the ALTER TABLE ... SPLIT PARTITION statement. You 
specify a value of the partitioning key column within the range of the partition at 
which to split the partition. The first of the resulting two new partitions includes all 
rows in the original partition whose partitioning key column values map lower than 
the specified value. The second partition contains all rows whose partitioning key 
column values map greater than or equal to the specified value.

You can optionally specify new attributes for the two partitions resulting from the 
split. If there are local indexes defined on the table, this statement also splits the 
matching partition in each local index.
In the following example fee_katy is a partition in the table vet_cats, which has a 
local index, jaf1. There is also a global index, vet on the table. vet contains two 
partitions, vet_parta, and vet_partb. 
To split the partition fee_katy, and rebuild the index partitions, issue the following 
statements:
ALTER TABLE vet_cats SPLIT PARTITION 
 fee_katy at (100) INTO ( PARTITION
 fee_katy1, PARTITION fee_katy2);

如果想要重建索引:
ALTER INDEX JAF1 REBUILD PARTITION fee_katy1;
ALTER INDEX JAF1 REBUILD PARTITION fee_katy2;
ALTER INDEX VET REBUILD PARTITION vet_parta;
ALTER INDEX VET REBUILD PARTITION vet_partb;

Note: If you do not specify new partition names, then the database 
assigns names of the form SYS_Pn. You can examine the data 
dictionary to locate the names assigned to the new local index 
partitions. You may want to rename them. Any attributes that you do 
not specify are inherited from the original partition.


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29802484/viewspace-1989167/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29802484/viewspace-1989167/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值