Subject Re: [firebird-support] Best index for BETWEEN?
Author Milan Babuskov
Dmitry Yemanov wrote:
> Ann W. Harrison wrote:
>> That query decomposes in the compiler into :something >= field1 and
>> :something <= field2. You might think that a compound index would
>> let you apply both predicates, but it doesn't (or at least it didn't
>> when I was paying attention). The scan of an index has to be
>> continuous - it can't skip over intermediate entries. If you have
>> a compound index, Firebird will use only the first element in the
>> index.
>
> Absolutely correct.

Thank you both for your answers.

--
Milan Babuskov
http://www.flamerobin.org
http://www.guacosoft.com