Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: foreign key constraints and indexes
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