查看Oracle的
redo日志切换频率
HIR5KV8G v2{24558279两个 sql,原理是一样的,第二个用到了统计函数。 ITPUB个人空间$Ou0p/OH Gp8N0B
:TM:HnqZ4q24558279 时间单位:分钟
9OWj"KLK4S7N+l24558279方法一、
X&M'D MK s24558279 select * from v$log a where a.THREAD# = 1 ;
set line 200
ITPUB个人空间4N/z zyI$p%ed
select b.SEQUENCE#, b.FIRST_TIME,a.SEQUENCE#,a.FIRST_TIME,round(((a.FIRST_TIME-b.FIRST_TIME)*24)*60,2) from v$log_history a, v$log_history b where a.SEQUENCE#=b.SEQUENCE#+1 and b.THREAD#=1 order by a.SEQUENCE# desc;
R#fM#N,V3m ?0h&KkoO24558279
select b.SEQUENCE#, b.FIRST_TIME,a.SEQUENCE#,a.FIRST_TIME,round(((a.FIRST_TIME-b.FIRST_TIME)*24)*60,2) from v$log_history a, v$log_history b where a.SEQUENCE#=b.SEQUENCE#+1 and b.THREAD#=1 order by a.SEQUENCE# desc;
R#fM#N,V3m ?0h&KkoO24558279
方法二、
E4Mf*y`Y+d1r24558279 set line 200 ITPUB个人空间lBu(rA.V,we
select sequence#,first_time,nexttime,round(((first_time-nexttime)*24)*60,2) diff from (select sequence#,first_time,lag(first_time) over(order by sequence#) nexttime from v$log_history where thread#=1) order by sequence# desc;
E4Mf*y`Y+d1r24558279 set line 200 ITPUB个人空间lBu(rA.V,we
select sequence#,first_time,nexttime,round(((first_time-nexttime)*24)*60,2) diff from (select sequence#,first_time,lag(first_time) over(order by sequence#) nexttime from v$log_history where thread#=1) order by sequence# desc;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24558279/viewspace-753849/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24558279/viewspace-753849/