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.
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/