Hash index initrans 的修改及 partition的增

ORA-14192: Cannot Modify Physical Index Attributes Of A Hash Index Partition (Doc ID 2795035.1)

SQL> alter index idx modify partition p1 initrans 100 PCTFREE 60;

alter index idx modify partition p1 initrans 100 PCTFREE 60

*

ERROR at line 1:

ORA-14050: invalid ALTER INDEX MODIFY PARTITION option

Cause

The user attempted to modify one of INITRANS/MAXTRANS/LOGGING/STORAGE

clause for an index partition of a Hash partitioned index

SQL> create table tab (c1 number, c2 number, c3 number);

Table created.

SQL> CREATE INDEX idx ON tab (c1,c2,c3) GLOBAL

PARTITION BY HASH (c1,c2)

(PARTITION p1,

PARTITION p2,

PARTITION p3 ,

PARTITION p4);

Index created.

select partition_name,pct_free,ini_trans from ALL_IND_PARTITIONS WHERE INDEX_NAME='IDX';

PARTITION_NAME PCT_FREE INI_TRANS


P1 10 2

P2 10 2

P3 10 2

P4 10 2

ALTER INDEX IDX MODIFY DEFAULT ATTRIBUTES initrans 100 PCTFREE 60;

Index altered.

SQL> alter index idx add partition p5;

Index altered.

SQL> select partition_name,pct_free,ini_trans from ALL_IND_PARTITIONS WHERE INDEX_NAME='IDX';

PARTITION_NAME PCT_FREE INI_TRANS


P1 10 2

P2 10 2

P3 10 2

P4 10 2

P5 60 100 >>>>>>>> New partitions will use the new storage attributes.

alter index idx drop partition p1; 只能加不能减,加了之后要重新平衡吧。

ORA-14330: Cannot drop a partition of a global hash-partitioned index

alter index idx add partition p6;

select partition_name,pct_free,ini_trans from ALL_IND_PARTITIONS WHERE INDEX_NAME='IDX';

PARTITION_NAME PCT_FREE INI_TRANS

1 P1 10 2

2 P2 10 2

3 P3 10 2

4 P4 10 2

5 P5 60 100

6 P6 60 100

相关推荐
老邓计算机毕设2 小时前
SSM学生选课系统xvbna(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面
数据库·学生选课系统·ssm 框架·高校教学管理
枷锁—sha3 小时前
【PortSwigger Academy】SQL 注入绕过登录 (Login Bypass)
数据库·sql·学习·安全·网络安全
逍遥德5 小时前
PostgreSQL 中唯一约束(UNIQUE CONSTRAINT) 和唯一索引(UNIQUE INDEX) 的核心区别
数据库·sql·postgresql·dba
工业甲酰苯胺5 小时前
字符串分割并展开成表格的SQL实现方法
数据库·sql
科技块儿6 小时前
IP定位技术:游戏反外挂体系中的精准识别引擎
数据库·tcp/ip·游戏
衫水6 小时前
[特殊字符] MySQL 常用指令大全
数据库·mysql·oracle
卓怡学长6 小时前
m115乐购游戏商城系统
java·前端·数据库·spring boot·spring·游戏
小句7 小时前
SQL中JOIN语法详解 GROUP BY语法详解
数据库·sql
阿杰 AJie7 小时前
MySQL 里给表添加索引
数据库·mysql
昊昊该干饭了7 小时前
一个真实查询需求如何从表设计走到高效 SQL
数据库·sql