Subject | Re: [firebird-support] Firebird BUG |
---|---|
Author | Ann W. Harrison |
Post date | 2006-01-17T16:36:35Z |
Dmitry Yemanov wrote:
the second update is to reduce the performance cost of multiple updates
of the same record. The cost for one is creating a single delta. The
cost for two is replacing the delta back version with a full back
version, which tends to be expensive because the back version is likely
not to fit on the primary data page. However, subsequent changes by
the same transaction will not need to change the back version at all.
The assumption is that the most common case is a transaction will modify
any particular record only once, but if it modifies the record twice,
it's likely to modify it multiple times.
Regards,
Ann
>One of the reasons for replacing the delta with a full back version on
> Correct. There are no new versions created when you modify the same record
> again and again in the same transaction as you're still the record owner.
> However, the second update is always much slower than others, as the engine
> replaces a delta with a full record version, so multiple updates are not
> good from the performance POV.
the second update is to reduce the performance cost of multiple updates
of the same record. The cost for one is creating a single delta. The
cost for two is replacing the delta back version with a full back
version, which tends to be expensive because the back version is likely
not to fit on the primary data page. However, subsequent changes by
the same transaction will not need to change the back version at all.
The assumption is that the most common case is a transaction will modify
any particular record only once, but if it modifies the record twice,
it's likely to modify it multiple times.
Regards,
Ann