ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 查看一个事务产生的redo大小

查看一个事务产生的redo大小

原创 Linux操作系统 作者:oracle_mao 时间:2012-05-15 11:03:48 0 删除 编辑

查看当前系统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/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 10g_dataguard_failover
请登录后发表评论 登录
全部评论

注册时间:2011-03-28

  • 博文量
    94
  • 访问量
    744045