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 分钟前
Django 后端实战指南_16:动作分类、动作库、动作收藏查询接口
数据库·python·django
ycydynq5 分钟前
django搜索功能
数据库·python·django
呆萌很5 分钟前
DISTINCT 和 GROUP BY 核心区别
数据库·sql
小蒜学长8 分钟前
基于数据挖掘的京东商城商品推荐系统设计与实现(代码+数据库+LW)
java·数据库·spring boot·后端·推荐系统·个性化推荐
小小AK12 分钟前
金蝶其他入库到MES送检签收:库存同步策略实战教程
数据库·制造
LuminousCPP15 分钟前
数据库学习笔记(二):MySQL 基础操作入门|在 CentOS Stream 10 上连接、建库与建表
数据库·经验分享·笔记·学习·mysql·centos
运维小斌18 分钟前
麒麟 V10 ARM64 离线部署 OceanBase:8 步实施手册
linux·数据库·oceanbase·麒麟
Gh0st_Lx42 分钟前
【1】MySQL MVCC 与隔离级别
数据库·mysql·mvcc
ss2731 小时前
AI时代首先数据库-PostgreSQL实战笔记 | 15 PostgreSQL子查询与嵌套查询(上)
数据库·人工智能·postgresql
这个DBA有点耶15 小时前
从症状到根因:数据库监控指标的分层方法与静态/动态阈值策略
数据库·mysql·代码规范