|
原帖由 zhujunyan001 于 2008-4-30 08:48 发表 ![]()
打个比方你对唯一键insert了一个已有的值,insert报错!
那么你没有修改任何的数据,那么拿来的undo呢!
It generates both redo and undo. Redo is easy to understand and check. You can find the session's "redo size" statistic go up in v$sesstat when that session keeps doing insert into table with a duplicate value, where the table has a unique constraint on that column.
You can check undo's activity by select * from v$sesstat where statistic# in ([the stat# from v$statname or v$sysstat for "undo change vector size" and "rollback changes - undo records applied"]) and sid = the_sid. My test in 10.2.0.1 shows that "rollback changes - undo records applied" goes up by 1 and "undo change vector size" goes up by about 70 bytes for a one-number-column table with PK on it and I run insert into testunique values (1) after it already has value 1.
Yong Huang |
|