Subject | Re: [IB-Architect] Optimizing cross-joins / aggregate-selects / no-fields from relation used - when possible ? |
---|---|
Author | Jim Starkey |
Post date | 2002-12-07T16:03:11Z |
At 04:41 PM 12/7/2002 +0100, Arno Brinkman wrote:
multiple versions of that record can exist simultaneously in the
index and your transaction can see at most one of them, the
engine must fetch the appropriate record and verify that value
matches the selection expression.
cardinality it must lock the entire index for the duration of
the operation. This is a disaster in a update intensive system.
When considering any optimization, you really must consider the
system cost, not just query cost. One could always improve
single user performance by locking other users for the duration
of a query/transaction. And you could win many benchmarks by
doing so. But the system would be unusable.
Jim Starkey
>Hi,The record number from the index is transaction dependent. But since
>
>> > Wouldn't it speed up increadibly when we don't fetch the linked record,
>but
>> > only do an index evaluate ?
>
>So the record-pointer available by the index isn't transaction dependent ?
>
multiple versions of that record can exist simultaneously in the
index and your transaction can see at most one of them, the
engine must fetch the appropriate record and verify that value
matches the selection expression.
>> So, Firebird can't optimize queries with index lookups by avoiding rowActually, no. For a database system to use an index to compute
>> retrieval.
>
>That would be pitty :(
>
cardinality it must lock the entire index for the duration of
the operation. This is a disaster in a update intensive system.
When considering any optimization, you really must consider the
system cost, not just query cost. One could always improve
single user performance by locking other users for the duration
of a query/transaction. And you could win many benchmarks by
doing so. But the system would be unusable.
Jim Starkey