码迷,mamicode.com
首页 > 数据库 > 详细

Oracle redo 日志切换时间频率

时间:2016-02-01 14:09:33      阅读:263      评论:0      收藏:0      [点我收藏+]

标签:

DB: 11.2.0.3.0

查看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 日志切换时间频率

标签:

原文地址:http://www.cnblogs.com/hankyoon/p/5174603.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!