Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Query to find multiple indexes on same columns but with different col posi

knowledgespringNov 8 2012 — edited Nov 9 2012
Oralce 11g database.

trying to find all the duplicate indexes which are created on same number of columns but with different column positions...

the following one is just an bad example.. i need list out duplicate indexes i.e. indexes created on same number of columns but columns order is different i.e. changed column positions.. the output should list all the indexes except last three indexes.. i need to find these from whole schema, db...

create table table1 (a number, b number, c number);
create index table1_idx1 (a,b);
create index table1_idx2 (a,b,c);
create index table1_idx3 (a,c);
create index table1_idx4 (b,c);
create index table1_idx5 (b,a);
create index table1_idx6 (c,a);
create index table1_idx7 (b,c,a);
create index table1_idx8 (a,c,b);
create index table1_idx9 (b,a,c);
create index table1_idx10 (a);
create index table1_idx11 (b);
create index table1_idx12 (c);

can someone please help?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2012
Added on Nov 8 2012
6 comments
2,723 views