Subject Re: [firebird-support] Question about Firebird indexes
Author Milan Babuskov
Sasha Matijasic wrote:
>> I simply want to index two columns of my table, so when I search
>> SEPARATELY for either DocumentTypeID or DocumentType, I want the SELECT
>> to be as fast as possible. Which is the road to take?
>>
> Firebird will use your compound indexes if you search for single columns

Only if you search the *first* columns. For example, if you have
compound index on (A,B) and you search WHERE B = 10, it will not use it.

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