Oracle 19C reverse反向索引测试
一、重建的方式改造反向索引
1、创建普通主键索引
create table MS_BN.test as select * from MS_SC.QT_CHA_LIST where rownum
select * from MS_BN.test;
alter table MS_BN.TEST
add constraint PK_testid primary key (list_id)
using index;
drop table MS_BN.test purge;
select * from dba_indexes where table_owner='MS_BN' and table_name='TEST'
2、创建反向主键索引
create table MS_BN.test as select * from MS_SC.QT_CHA_LIST where rownum
create unique index MS_BN.idx_listid on MS_BN.test (list_id) reverse;
alter table MS_BN.TEST
add constraint PK_testid primary key (list_id)
using index ;
二、直接改造
alter index MS_BN.PK_testid rebuild reverse;
三、分区表测试
如下图,分区表,local字段的不支持反向索引
全局索引,则没有问题.