Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: foreign key constraints and indexes

Re: foreign key constraints and indexes

From: Vincent Ventrone <vav_at_brandeis.edu>
Date: Mon, 3 Dec 2001 15:34:04 -0500
Message-ID: <9ugng7$r6n$1@new-news.cc.brandeis.edu>

"> 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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US