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

相关推荐
码农阿豪1 分钟前
平替MongoDB:金仓多模数据库助力电子证照国产化实践
数据库·mongodb
罗超驿2 分钟前
22.深入剖析JDBC架构:从原生API到企业级数据交互核心
java·数据库·mysql·面试
易辰君6 分钟前
【数据库】MongoDB深度解析与Python操作指南:从安装到实战操作全覆盖
数据库·mongodb
一直有一个ac的梦想11 分钟前
cmu15445 2025fall lec 18 transactions with two-phase lock
java·开发语言·数据库
身如柳絮随风扬17 分钟前
Redis 集群脑裂深度剖析:成因、危害与防丢失策略
数据库
雨辰AI1 小时前
人大金仓 V9 生产级专用监控大盘(含 120 + 指标 + 告警规则 + 一键导入)
java·开发语言·数据库·mysql·政务
l1t2 小时前
Hy-MT2-1.8B总结的pgvector 0.8.2解决了并行HNSW索引构建漏洞
数据库·人工智能·postgresql
我是一颗柠檬2 小时前
【MySQL全面教学】MySQL条件查询与排序Day4(2026年)
数据库·后端·mysql
丷丩2 小时前
Postgresql基础实践教程(四)
数据库·postgresql
六月雨滴2 小时前
RMAN 增量备份(Incremental Backup)
数据库·oracle