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: Index usage on foreign key selects

Re: Index usage on foreign key selects

From: Mikel <not_at_me.com>
Date: 2000/03/19
Message-ID: <QOfB4.10257$Ge1.220178@newscontent-01.sprint.ca>#1/1

Steve,

The only constraints that automatically create indexes are the Primary Key constraint, and the Unique constraint. You must create indexes for any foreign keys that you create manually (assuming you want indexes on these foreign keys). Also, you do not need pre-built relationships to join tables in a query.

Mike

stevie <sluetge_at_siliconplanet.de> wrote in message news:ZALBPIek$GA.154_at_fnews1.vi-internet.de...
> Is there anybody who can tell me about the following:
> How does an 8.1.6 server maintain the foreign keys ? Does it create an
 index
> automatically ? Or do I have to build one ?
> When I have to tables a (Fields: a.a_id, a.a_name) and b (Fields: b.b_id,
> b.b_name), and a link table named lnk_a_b (Fields: lnk_a_b.a_id,
> lnk_a_b.b_id), and a foreign key relationship between all tables is
> established, how is a select statement processed:
>
> select a.a_id, a.a_name, b.b_id, b.b_name
> from a, b, lnk_a_b
> where lnk_a_b.a_id = a.a_id and lnk_a_b.b_id = b.b_id;
>
> Are the foreign key indices used, and do I have to build them or does
> 8.1.6. do this for me ?
>
> Thanks for helping out
>
>
Received on Sun Mar 19 2000 - 00:00:00 CST

Original text of this message

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