Subject Re: [ib-support] Indexs!
Author Ann W. Harrison
At 06:07 PM 9/30/2002 +0200, Martijn Tonies wrote:

>Question: I tend to put the _most_ selective first to reduce index page
>reads
>and narrowing down any results from the index... Isn't this right?

Nope. Firebird treats the whole index key as if it were a single
string of binary bytes. The only thing that affects the number of
index reads is the compressed length of the key. Leading duplicate
bytes disappear. So if most of your keys are of the form

man001, man002, man003, man004, man005, ...

the characters man00 would be stored only once, and subsequent
entries would be 2, 3, 4. The upper levels reflect the whole
key, so the fact that there are 2, 3, 4... entries for man00,
man01, man02, woman00, and dog00 doesn't confuse the index code.


Regards,

Ann
www.ibphoenix.com
We have answers.