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: replace this with _at_ <_at_)xs4all.nl>
Date: 1998/01/26
Message-ID: <34ccbe80.37118213@news.xs4all.nl>#1/1

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.


Received on Mon Jan 26 1998 - 00:00:00 CST

Original text of this message

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