这篇文章主要介绍如何查看Oracle的redo日志切换频率,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
查看Oracle的redo日志切换频率
两个sql,原理是一样的,第二个用到了统计函数。
时间单位:分钟
方法一、
select * from v$log a where a.THREAD# = 1 ;
set line 200
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;
方法二、
set line 200
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;
以上是“如何查看Oracle的redo日志切换频率”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注编程网行业资讯频道!