|
Re: Re: Redo log buffer和Redo log file到底存储的是什么?请大家继续讨论
machao's words
在一个10万行的表上执行 delete from <tablename>
在archive log 打开的情况下,会写很多的log出来. 但语句只有一条.没有可能如此多的log里面就一条语句吧
reminds me that what I said earlier is quite inaccurate. Here's an experiment I just did. I created a 1-column table test and inserted 2 rows (12345 and -100) into it. Then I typed delete from test. Launching logmnr and looking at v$logmnr_contents.sql_redo, I see
delete from YONG.TEST where A = 12345 and ROWID = 'AAAAu1AAFAAAAA1AAA';
delete from YONG.TEST where A = -100 and ROWID = 'AAAAu1AAFAAAAA1AAB';
I suppose this means Oracle records every row operation in redo log. That is, "delete from 100krowtable" is translated into 100,000 "delete from 100krowtable where [column name/value]s and ROWID = '[rowid]'" statements. Since these row-level operations are recorded along with actual column values, saying redo only records operations, not actual data, is misleading at the best, or totally wrong if you view it in a different perspective. I apologize for this loose thinking.
Yong Huang
最初由 chao_ping 发布
[B]我想yonghuang得意思是:
“Redo log 只是记录执行的语句, not actual data. You keep forgetting this. ” 是对上面那个朋友说得,就是说他老是认为这样,实际上这样是错误得。
redo log记录了所有对数据库得Block得修改。rbs得修改也是记录在redo log里面得,因为rbs也是datafile里面得。
至于DDL,就是记录了对Oracle数据库字典得操作,那些确实是只记录语句(其实说语句也不准确,只能说是记录了对系统表空间的DML操作导致的系统表空间的Block的改变)。
[/B] |
|