Subject Re: [firebird-support] Query plan insists on NOT USING an index
Author Dmitry Yemanov
Franz J Fortuny wrote:
>
> I suppose this is a problem for the developers to check upon, since it
> is obviously a BUG in Firebrid 2.0, build 12748-0 (last non-beta version).

This is not a bug, Firebird just cannot handle the IN predicate another way.

> Even with this variation of the second query, it won't work properly
> (that is, it will make a SCAN of SUBARTIS):
>
> ...
> left outer join areas b on b.idarea=ex.idarea
> join tor_equiv te on te.idsub1=:ids and te.idsub2= a.idsubarti

Move the last join upper, i.e. before all the left joins. It should help.


Dmitry