Subject Re: UPDATE to same record causing heavy disk I/O
Author Dmitry Yemanov
23.12.2015 01:36, Ann Harrison wrote:

> Like I said, I have always kept transactions very short. I am
> thinking of something like this instead:
>
> a) begin a transaction, update FIELD_1 of MYTABLE.
> b) update FIELD_2 of MYTABLE.
> c) update FIELD_3 of MYTABLE.
> d) update FIELD_4 of MYTABLE.
> e) update FIELD_5 of MYTABLE, COMMIT, and end transaction.
> If something fails anywhere in between, I would ROLLBACK this single
> transaction.
>
> That's not going to work either. Your first update will create a back
> version that's just the difference between the old record state and the
> new state. The second (or maybe third) will create a back version
> that's the whole record (IIRC) - much larger and possibly off page.

Correct, but from another side third, fourth, etc updates will not
create any new versions. May be worth checking whether a "heavy" second
update could be better than creating a long version chain.


Dmitry