Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: foreign key constraints and indexes
"> Some databases create non-unique indexes when a foreign key constraint is
> created. i.e.
> create table test2
> (id number, id2 number unique, constraint fk_test2 FOREIGN KEY (id)
> references test(id));
>
> So a non unique index would be created on id in test2.
> Oracle does not seem to do this.
No way to make it happen automatically but it would be a good idea to create indexes on all FK columns -- both to improve JOIN performnace & also to avoid locking parent tables when you do DML on the children. Received on Mon Dec 03 2001 - 14:34:04 CST