两个sql原理是一样的第二个用到了统计函数
时间单位分钟
select * from v$log
where aTHREAD# =
select bSEQUENCE# bFIRST_TIME
aSEQUENCE# aFIRST_TIME
round(((aFIRST_TIMEbFIRST_TIME)*)*)
from v$log_history a v$log_history b
where aSEQUENCE# = bSEQUENCE#+
and bTHREAD#=
order by aSEQUENCE# desc
select sequence#first_timenexttimeround(((first_timenexttime)*)*) diff
from (
select sequence#first_time lag(first_time) over(order by sequence#) nexttime
from v$log_history
where thread#=
) order by sequence# desc