Subject Re: [IBO] Join criteria in the WHERE clause
Author Nando Dessena
Chris,

> Here is an example to help clarify:
>
> SELECT *
> FROM NAME_ADDRESS N
> LEFT JOIN BILLING_DATA B
> ON B.CO = N.CO
> AND B.YR = N.YR
> AND B.PARCEL = N.PARCEL
> ORDER BY N.CO, N.YR, N.PARCEL
>
> Here is the resulting plan:
> PLAN SORT (JOIN (N NATURAL,B INDEX (BILLING_DATA_00)))
>
> SELECT *
> FROM NAME_ADDRESS N
> , BILLING_DATA B
> WHERE B.CO = N.CO
> AND B.YR = N.YR
> AND B.PARCEL = N.PARCEL
> ORDER BY N.CO, N.YR, N.PARCEL
>
> Here is the resulting plan:
> PLAN JOIN (N ORDER NAME_ADDRESS_00,B INDEX (BILLING_DATA_00))
>
> Both tables have an index over CO, YR, PARCEL.

FWIW, these two examples are not really equivalent; the first is an
outer join while the second is an inner join.
--
____
_/\/ando