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: Is this JOIN good ?

Re: Is this JOIN good ?

From: Charles Hooper <hooperc2000_at_yahoo.com>
Date: 16 Oct 2006 11:04:53 -0700
Message-ID: <1161021893.112340.102780@i42g2000cwa.googlegroups.com>


klabu wrote:
> Assuming you don't know anything about these 3 tables beyond FK & PK
>
> select *
> from A, B, C
> where A.fk = C.pk
> and B.fk = C.pk
>
> Is this JOIN "complete" ?
> or an additional predicate is needed between A and B ?
>
>
> thanks

Transitive closure:
A = C
B = C
Logic states that this implies that:
A = B

Perform a 10053 trace, you may see the Cost Based optimizer adding a constraint like this:
A.FK = B.FK

Charles Hooper
PC Support Specialist
K&M Machine-Fabricating, Inc. Received on Mon Oct 16 2006 - 13:04:53 CDT

Original text of this message

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