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

Home -> Community -> Usenet -> c.d.o.misc -> Re: [Q] Foreign keys and indexes

Re: [Q] Foreign keys and indexes

From: <coneal_at_exis.drop_the_spam_i've_seen_enough.net>
Date: 1998/01/27
Message-ID: <34ce36b4.53480078@news.exis.net>#1/1

On Mon, 26 Jan 1998 16:54:12 GMT, martinj(replace this with @)xs4all.nl (Martin Jesterhoudt) wrote:

>Hi Matthias,
>
>>ALTER TABLE EMP
>>ADD CONSTRAINT EMP_FK
>>FOREIGN KEY (DEPTNO) REFERENCES DEPT (DEPTNO)
>>;
>>CREATE INDEX TEST ON EMP (DEPTNO, EXTRA_FIELD);
>>
>>Would do your job though I'm in doubt wether this index would be used
>>for accessing parent table.
>
>I was pointed to a section in the Oracle references. It stated that an
>index is necessary to avoid (share) locking of the parent table. The
>index seems to do nothing with performance issues besides the
>lock-prevention.
>

Just because you create an index does not necessarily mean that it will or should be used. If further elaboration is needed please ask. Received on Tue Jan 27 1998 - 00:00:00 CST

Original text of this message

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