Subject Re: [IB-Architect] Optimizing cross-joins / aggregate-selects / no-fields from relation used - when possible ?
Author Pavel Cisar
Arno,

On 7 Dec 2002 at 10:54, Arno Brinkman wrote:

> I've seen in the source that allways a record is fetched (getting page where
> record is stored) when a index-retrieval is done, right ?

Right.

> Wouldn't it speed up increadibly when we don't fetch the linked record, but
> only do an index evaluate ?

Unfortunately, engine must read the record because index node doesn't
contain necessary information about row validity for actual transaction.
(the transaction number is stored only in rows). The second reason for
row retrieval is (if I understood it well) the second key comparison
based on actual values (index keys are mangled for bitwise comparison).

So, Firebird can't optimize queries with index lookups by avoiding row
retrieval.

Best regards
Pavel Cisar
http://www.ibphoenix.com
For all your upto date Firebird and
InterBase information