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)byJOIN

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

From: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Mon, 01 Sep 2003 08:13:56 -0700
Message-ID: <3F536234.68EA4284@exxesolutions.com>


mitt wrote:

> 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;

Of course. I logged on while waiting for my coffee to brew. I should have realized you were referring to the child table.

Oh well. Perhaps the question helped others who had already had their morning coffee or tea.

--
Daniel Morgan
http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
http://www.outreach.washington.edu/extinfo/certprog/aoa/aoa_main.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Mon Sep 01 2003 - 10:13:56 CDT

Original text of this message

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