查看当前系统redo的初始值大小:
set autotrace off
select a.name, b.value
from v$statname a, v$mystat b
where a.statistic# = b.statistic#
and lower(a.name) like '%' || lower('&S')||'%'
/
输入:redo size
举例:
SQL> select a.name, b.value
2 from v$statname a, v$mystat b
3 where a.statistic# = b.statistic#
4 and lower(a.name) like '%' || lower('&S')||'%'
5 /
Enter value for s: redo size
NAME VALUE
---------------------------------------------------------------- ----------
redo size 7276340
redo size for lost write detection 0
redo size for direct writes 0
然后执行一个事务,比如insert之类的
举例:
SQL> insert into t select * from t;
524288 rows created.
执行另一个脚本查看这个事务所产生的redo值
set verify off
select a.name, b.value V, to_char(b.value-&V,'999,999,999,999') diff
from v$statname a, v$mystat b
where a.statistic# = b.statistic#
and lower(a.name) like '%' || lower('&S')||'%'
/
举例:
SQL> select a.name, b.value V, to_char(b.value-&V,'999,999,999,999') diff
2 from v$statname a, v$mystat b
3 where a.statistic# = b.statistic#
4 and lower(a.name) like '%' || lower('&S')||'%'
5 /
Enter value for v: 7276340----这里的值是上一个脚本执行得到的结果
Enter value for s: redo size
NAME V DIFF
---------------------------------------------------------------- ---------- ----------------
redo size 14504056 7,227,716
redo size for lost write detection 0 -7,276,340
redo size for direct writes
大概生产了14m的redo
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24500180/viewspace-723588/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24500180/viewspace-723588/