Subject Re: Any downside to this left join in a view workaround?
Author wearycleary00
--- In firebird-support@yahoogroups.com, "Arno Brinkman"
<firebird@a...> wrote:
> Hi,
>
> > > > > PLAN JOIN(JOIN(identityname NATURAL, InvHead INDEX (...)),
acctname
> > > > INDEX
> > >
> > > What PLAN does the engine use with :
> > >
> > > select identityname.idref
> > > from identityname
> > > inner join InvHead on identityname.idref = invhead.idref
> > > left join acctname on invhead.invheadref = acctname.invheadref
> > > where invhead.invheadref = 25809
> >
> > For this SQL it uses the first of the 3 you supplied above.
>
> Okay, but can you POST the PLAN. I'm curious what indices are used.

Hi

The plan is

PLAN JOIN (JOIN (IDENTITYNAME NATURAL,INVHEAD INDEX
(RDB$PRIMARY172)),ACCTNAME INDEX (RDB$PRIMARY6))

Thanks

Bernard