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: [SOLVED for good] performance tuning questions: replace IN (values)by JOIN

Re: [SOLVED for good] performance tuning questions: replace IN (values)by JOIN

From: mitt <nospam_at_nospam.at>
Date: Mon, 01 Sep 2003 17:06:30 +0200
Message-ID: <3F536076.7010108@nospam.at>


Daniel Morgan wrote:

>>>isn't there only a locking issue if you update the primary key of the
>>>parent table? Updating other fields should be OK. Please correct me if
>>>I'm wrong.
>>
>>and the same is true for deletes of parent-rows and inserts of
>>child-rows,...
>>the situations in which it is not necessary to have an index on a
>>foreign key are so rare in real life, it easiest not to think much and
>>just create one!

>
>
> Given that foreign keys must be to either a primary key or unique
> constraint. And given that both of these constraints build an index by
> default ... how could you not have an index on the column in the parent
> table?
>

correct me, if I'm wrong, but aren't we talking about the column in the child table, which references the parent table?! I call this the foreign key column; sorry if I was not precise enough; that column in the child table does not automatically have an index, only because it is defined as "...references father.xxx", but almost always strongly needs one; Received on Mon Sep 01 2003 - 10:06:30 CDT

Original text of this message

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