Subject Re: [firebird-support] Query tuning help
Author Arno Brinkman
Hi,

> The testing of this query was running against a Firebird 1.0 server.
>
> Preparing the query against a Firebird 1.0.3 server produces the same
> plan (I have not tried running it, as I don't want to slow down our live
> server).

Maybe you could post some metadata and the PLAN.

> Interestingly enough, running it against our FB 1.5 RC 4 test server
> produces various results as follows:

I guess Status has a very low selectivity, but have you tried this one (on
FB1.5):

WHERE
(Table4.ForeignKey1 = 170) and
( ((Table1.ForeignKey2 = 962) and (Table1.Status = 8)) or
((Table1.ForeignKey2 = 963) and (Table1.Status = 8)))


Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird links :
http://www.firebirdsql.com
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/


Nederlandse firebird nieuwsgroep :
news://80.126.130.81