索引分区的compress ORA-28659

打算把老数据的索引给压缩下,结果做不了,报ORA-28659

SQL> DROP TABLE test_partition;
 
Table dropped
 
SQL>
SQL> CREATE TABLE test_partition
  2  ( ID NUMBER,NAME VARCHAR2(200)
  3  )
  4  PARTITION BY RANGE (ID)
  5  (PARTITION test01 VALUES LESS THAN (100),
  6  PARTITION test02 VALUES LESS THAN (200),
  7  PARTITION test03 VALUES LESS THAN (300),
  8  PARTITION test04 VALUES LESS THAN (MAXVALUE))
  9  /
 
Table created
 
SQL> CREATE INDEX idx_test_PARTITION on test_partition (ID) local;
 
Index created
 
SQL> alter index idx_test_PARTITION rebuild partition test01 compress;
 
alter index idx_test_PARTITION rebuild partition test01 compress
 
ORA-28659: COMPRESS must be specified at object level first

解决方法也很奇怪,先建立compress的local索引,在把不需要compress的分区给nocompress

SQL> drop index idx_test_PARTITION;
 
Index dropped
 
SQL> CREATE INDEX idx_test_PARTITION on test_partition (ID) LOCAL COMPRESS;
 
Index created
 
SQL>
SQL> alter index idx_test_PARTITION rebuild partition test04 nocompress;
 
Index altered
SQL> alter index idx_test_PARTITION rebuild partition test02 nocompress;
 
Index altered
SQL> alter index idx_test_PARTITION rebuild partition test03 nocompress;
 
Index altered

但是,这个时候,如果想把个别分区给compress是可以的:

SQL> alter index idx_test_PARTITION rebuild partition test02 compress;
 
Index altered

估计一个分区索引的个别分区能否compress是和对象级别的能否compress相关的

表的分区能独立的compress

 

 


 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8242091/viewspace-613142/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/8242091/viewspace-613142/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值