Subject Re: [firebird-support] Firebird 2.0 Indexing
Author Ann W. Harrison
Kjell Rilbe wrote:
>
> Ah, but the cached index page does not have to be identical with how it
> look on disk. The in-memory version could hold extra cached info such as
> this transaction info for quick and easy access. In case the index page
> is in cache but the data page isn't, this would save a lot of time. But
> I do realize there are downsides. Probably lot's of'em! :-)
>

That is a lot harder than it sounds. As a general thing, Firebird
doesn't expand pages it keeps in cache. When a record is referenced, it
is expanded from the page and stored in a separate structure. Index
entries are decompressed on the fly and never stored.

If a field switches back and forth between two values, only the two
values appear in the index, so for each value you could have several
disjoint sequences of transactions. Yes, it could be maintained, but it
would be a huge amount of data - and useful only for partially
optimizing queries that could be better handled in other ways.


Regards,


Ann