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

相关推荐
神明不懂浪漫3 分钟前
【第二章】库、表、增删改查操作
开发语言·数据库·经验分享·笔记
其实防守也摸鱼10 分钟前
OpenClaw 深度解析:从原理到实战的完整指南
运维·服务器·数据库·github·copilot
hzp66615 分钟前
doris学习6:参数调优
数据库·doris·参数·数据库调优
盟道科技1 小时前
小程序电商订单超时自动取消的三种实现方案:定时扫描、Redis 过期监听、延迟消息对比与生产落地
数据库·redis·小程序
剑锋所指,所向披靡!1 小时前
MySQL存储引擎
数据库·mysql
reasonsummer1 小时前
【办公类-146-05】20260901《一分园、二分园四大教育》(优化版:标题excle+复制AI文字+Python占位符录入)
开发语言·数据库·c#
2301_800954991 小时前
关系型数据库与非关系型数据库详解
数据库·nosql
崖边看雾1 小时前
MySQL——SQL 经典练习题:学生选课成绩查询(附详细注释)
大数据·数据库·sql·mysql
众壹新能源科技1 小时前
经营口径与运维口径不一致时,发电量报表怎么对账
运维·数据库·人工智能
jyOverQ2 小时前
MySQL 索引为什么能加快查询?B+Tree 到底是什么?
数据库·mysql