Subject Re: [firebird-support] Re: Creating index
Author Ann W. Harrison
Adam wrote:
>
> When you have an index, Firebird will build a bitmap of the values
> that meet the criteria by reading the index pages. When it knows the
> page where the data of interest is located, it will then go to the
> page and read it, then back to the index to get the next record and so
> on.

Close, but not quite. Firebird reads then index and builds a bitmap
of the records that match the criteria specified. So there's one pass
to read the index and a separate pass - in storage order - to return
the data. No back and forth between index and data ... generally.
The exception is when the index matches the sort list. In that case,
Firebird bounces between index and data and returns data in sorted
order, not storage order.

Regards,


Ann