ITPub博客

首页 > 数据库 > Oracle > 【学习笔记】分区表和分区索引——管理索引分区(四)

【学习笔记】分区表和分区索引——管理索引分区(四)

原创 Oracle 作者:shuangoracle 时间:2010-09-07 15:41:02 0 删除 编辑

1、增加索引分区(add index partitions)
add index partitions 只适用于 hash 的 global 索引。
语法:
alter index indexname add partition ptname tablespace tablespacename;

2、删除索引分区(droping index partitions)
语法:alter index indexname drop partition ptname;
注意:只针对gloabal索引的range分区;drop partition 删除的只是分区,数据还在表中,导致删除分区后,数据存储到比它
更高的区间值的索引分区里了。另外global索引必须建maxvalue分区,并且该分区不能删除。

3、重新编译索引分区(rebuilding index partition)
注意:global索引只支持range分区,local索引无限制。
语法:
alter index indexname rebuild partition/subpartition ptname;

对于local索引分区还可以这样操作:
alter tbale tbname modify partition/subpartition ptname rebuild unusable local indexes;

4、重命名索引分区(renaming index partitions)
语法:alter index indexname rename partition/subpartition ptname to newptname;
注意:global分区值能够支持range分区,local索引无限制。

5、分拆索引分区(splitting index partitions)
语法:alter index indexname split partition ptname at(valuename) into (partition pt1 tbspace,partition pt2 tbspace);
注意:分拆索引分区只能操作global索引中的range类型分区分区(local分区会自动维护)。

6、修改索引分区默认属性(modify default attributes of index partitions)
语法:alter index idxname modify default attributes for partition ptname;
注意:修改索引分区默认属性只能操作global索引中的range类型分区分区(local分区会自动维护)。

7、修改索引的当前属性(modify real attributes of index partitions)
语法:alter index idxname modify attributes for partition ptname;
注意:修改索引分区默认属性只能操作global索引中的range类型分区分区(local分区会自动维护)。

[@more@]

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

请登录后发表评论 登录
全部评论

注册时间:2010-08-25

  • 博文量
    84
  • 访问量
    242684