Subject | Re: [firebird-support] Query tuning help |
---|---|
Author | Arno Brinkman |
Post date | 2003-07-30T08:08:22Z |
Hi,
index on both of them?
condition, but this depends on the selectivity from the used fields.
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
> >> WHEREIs there a compound index on ForeignKey and Status or is there a single
> >> (Table4.ForeignKey1 = 170) and
> >> ( ((Table1.ForeignKey2 = 962) and (Table1.Status = 8)) or
> >> ((Table1.ForeignKey2 = 963) and (Table1.Status = 8)))
>
> Just tried it now, and it is much faster. Also tried it back on FB 1 and
> it also is much faster (returns in a few seconds rather than hours).
index on both of them?
> Is there any guide line on how you should structure these queries sinceAt least try to keep only the fields from the same table together in a OR
> they produce drastically different performance results? Or do you just
> keep on mucking with it until you find something that works (or works
> fast enough?).
condition, but this depends on the selectivity from the used fields.
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