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

相关推荐
玄同765几秒前
SQLite + LLM:大模型应用落地的轻量级数据存储方案
jvm·数据库·人工智能·python·语言模型·sqlite·知识图谱
吾日三省吾码2 分钟前
别只会“加索引”了!这 3 个 PostgreSQL 反常识优化,能把性能和成本一起打下来
数据库·postgresql
chian-ocean3 分钟前
百万级图文检索实战:`ops-transformer` + 向量数据库构建语义搜索引擎
数据库·搜索引擎·transformer
小Tomkk23 分钟前
数据库 变更和版本控制管理工具 --Bytebase 安装部署(linux 安装篇)
linux·运维·数据库·ci/cd·bytebase
qq_12498707531 小时前
基于JavaWeb的大学生房屋租赁系统(源码+论文+部署+安装)
java·数据库·人工智能·spring boot·计算机视觉·毕业设计·计算机毕业设计
倒流时光三十年1 小时前
SpringBoot 数据库同步 Elasticsearch 性能优化
数据库·spring boot·elasticsearch
码农小卡拉2 小时前
深入解析Spring Boot文件加载顺序与加载方式
java·数据库·spring boot
怣502 小时前
MySQL多表连接:全外连接、交叉连接与结果集合并详解
数据库·sql
wjhx2 小时前
QT中对蓝牙权限的申请,整理一下
java·数据库·qt
冰暮流星2 小时前
javascript之二重循环练习
开发语言·javascript·数据库