|
redo包含一下的重做信息:
1.回滚段头(undo segment header)
2.撤销块(undo block)
3.数据段头(data segment header)
4.数据块(data block)
测试环境:
SQL> select*From v$version where rownum<2;
BANNER
-------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 60
Current log sequence 68
create table notemp_test(id number,name char(1000) default ' ');
case1:对于永久表的DML
--insert 10000行数据
insert into notemp_test(id)select object_id from dba_objects where rownum<=10000;
select xid,used_ublk,used_urec from v$transaction;
XID USED_UBLK USED_UREC
---------------- ---------- ----------
0A0015000B030000 25 2500
--USED_UREC创建了2500条撤销记录(undo record)
select*From v$sesstat where statistic#=(select statistic# from v$statname
where name='redo entries')and sid=(select sid from v$mystat where rownum=1);
SID STATISTIC# VALUE
---------- ---------- ----------
130 139 8392
--创建了8392个重做条目(redo entry)
commit以上的测试。
case2:对于永久表的direct load aperation
insert/*+ append */ into notemp_test select*from notemp_test where rownum<=10000;
select xid,used_ublk,used_urec from v$transaction;
XID USED_UBLK USED_UREC
---------------- ---------- ----------
0300090038030000 1 1
--创建一条撤销记录
select*From v$sesstat where statistic#=(select statistic# from v$statname
where name='redo entries')and sid=(select sid from v$mystat where rownum=1);
SID STATISTIC# VALUE
---------- ---------- ----------
130 139 617
--创建617个redo entry,还是挺多的,可能是要对数据段头的信息创建redo |
|