Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: [SOLVED for good] performance tuning questions: replace IN (values)by JOIN
"Daniel Morgan" <damorgan_at_exxesolutions.com> wrote in message
news:3F535E0D.7716475A_at_exxesolutions.com...
> mitt wrote:
> 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?
>
Er, Daniel. The reason it's called a foreign key is that it is a primary key in *another* table, but a mere column in the child table, which is where it needs indexing. It is, in other words, a column which 'comes from' another table (from the parent, to the child), and is thus strange to it, or foreign.
So yes, the source of a foreign key will always be indexed. But the foreign key itself (ie, the presence of that column in a different table) will not be unless you make it so.
Regards
HJR
Received on Mon Sep 01 2003 - 15:00:02 CDT
![]() |
![]() |