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: ayrobins <anthony_at_lumos.com>
Date: Wed, 05 Dec 2001 16:24:14 GMT
Message-ID: <OSrP7.82$6e6.12962@dca1-nnrp2.news.digex.net>


yeah, DBs like cloudscape (informix) automatically creates indexes on foreign keys.
So i erroneously thought oracle does the same.

thanx

"Vincent Ventrone" <vav_at_brandeis.edu> wrote in message news:9ugng7$r6n$1_at_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 Wed Dec 05 2001 - 10:24:14 CST

Original text of this message

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