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: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/03/20
Message-ID: <953509957.19083.2.pluto.d4ee154e@news.demon.nl>#1/1

Foreign keys are not created automatically, and yes, you SHOULD create them.

Hth,

Sybrand Bakker, Oracle DBA

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 Mon Mar 20 2000 - 00:00:00 CST

Original text of this message

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