#进行update操作:
sys@ORCL> update hn.emp set sal=3000 where empno=7902;
sys@ORCL> select b.name,a.value
2 from v$mystat a,v$statname b
3 where a.statistic#=b.statistic# and b.name in ('redo size','undo change vector size');
NAME VALUE
------------------------------ ----------
redo size 460
undo change vector size 160
#update操作产生了460大小redo信息,160大小undo信息
sys@ORCL> rollback;
Rollback complete.
sys@ORCL> select b.name,a.value
2 from v$mystat a,v$statname b
3 where a.statistic#=b.statistic# and b.name in ('redo size','undo change vector size');
NAME VALUE
------------------------------ ----------
redo size 784
undo change vector size 160
结论1:
rollback操作也产生redo 信息。
sys@ORCL> update hn.emp set sal=3000 where empno=7902;
1 row updated.
sys@ORCL> select b.name,a.value
2 from v$mystat a,v$statname b
3 where a.statistic#=b.statistic# and b.name in ('redo size','undo change vector size');
NAME VALUE
------------------------------ ----------
redo size 1244
undo change vector size 320
sys@ORCL> commit;
Commit complete.
sys@ORCL> select b.name,a.value
2 from v$mystat a,v$statname b
3 where a.statistic#=b.statistic# and b.name in ('redo size','undo change vector size');
NAME VALUE
------------------------------ ----------
redo size 1384
undo change vector size 320
结论2:
commit提交瞬间,也产生redo信息,是因为要讲最后的那些没有提交的redo信息写入到redo log file中
select语句不产生redo和undo信息。
阅读(829) | 评论(0) | 转发(0) |