Informix更新记录的过程(update row)

数据库版本:12.10.FC6X5
操作系统:RHEL 6U4 64bit
目的:通过onlog命令熟悉更新记录时的数据库内部操作过程

执行update操作更新记录

[informix@rhel6u4 temp]$ dbaccess testdb -

Database selected.

> update ttt set col2 = 'col2001', col3 = 'col3001' where col1 = 1;

1 row(s) updated.

然后通过onlog -n <逻辑日志编号> 的输出,可知数据库内部需要完成如下操作:
请输入图片描述

1、开始事务
BEGIN(begin work):包含事务号、开始时间、用户;
2、保留数据页前映像
HUPBEF(Home row update,before-image.):保留前映像
3、更新该页为修改后映像
HUPAFT(Home row update,after-image.):更新映像
4、完成操作,提交
COMMIT(commit work): 包含提交时间。

标签: none

添加新评论

Free Web Hosting