Subject | Re: UPDATE to same record causing heavy disk I/O |
---|---|
Author | Dmitry Yemanov |
Post date | 2015-12-23T17:01:01Z |
23.12.2015 01:36, Ann Harrison wrote:
create any new versions. May be worth checking whether a "heavy" second
update could be better than creating a long version chain.
Dmitry
> Like I said, I have always kept transactions very short. I amCorrect, but from another side third, fourth, etc updates will not
> 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.
create any new versions. May be worth checking whether a "heavy" second
update could be better than creating a long version chain.
Dmitry