I have a table
create table1( column1 number(10, column2 number(10), column3 number(10) );
column1 is the primary key column2 and column3 is the column3 key
I created a unique 2 column constraint
alter table table1 add constraint table1_contr1 unique(column1,column2) using index tablespace tbs1;
when i went to create an index for both columns as
create index table1_idx1 on table1(column1,coulmn2); ERROR at line 1: ORA-01408: such column list already indexed
So Oracle already created the index when I created the unique constraint. But if I create the index separately, it takes those
create index table1_idx1 on table1(column1); create index table2_idx2 on table2(column2);
Now my question is: after having a unique restriction on both columns, do I still need to worry about creating an index for each column? Will skipping indexes from a single column affect performance when querying a table?
This is on the oracle 11R2.
source share