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
Posted by: Dmitry Yemanov <dimitr@users.sourceforge.net>
| Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (6) |
Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu. Try FAQ and other links from the left-side menu there.
Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
No comments:
Post a Comment