Subject Re: [firebird-support] Query tuning help
Author Daniel Rail
Hi,

At July 29, 2003, 01:07, C Fraser wrote:
> Interestingly enough, running it against our FB 1.5 RC 4 test server
> produces various results as follows:

> Version 1: Using (Table1.ForeignKey2 >= 962) or (Table1.ForiegnKey2 <=
> 973)
> Result: Plan had no Naturals in it, performance good, however, not all
> the Ids are sequential so I would still need to use this and option 3.

What do you mean by "not all IDs are sequential"? If an index is used
in the plan, then there's nothing to worry about. If you are
referring to how the result set is ordered, then add an ORDER BY
clause.

And, have you tried: (Table1.ForeignKey2 BETWEEN 962 AND 973)

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)