<br />
<br />
select sequence#,<br />
to_char(first_time, 'yyyy-mm-dd hh24:mi') || ' ' ||<br />
to_char(nexttime, 'hh24:mi'),<br />
round(((first_time - nexttime) * 24) * 60, 2) diff<br />
from (select sequence#,<br />
first_time,<br />
lag(first_time) over(order by sequence#) nexttime<br />
from v$log_history<br />
where thread# = 1<br />
and trunc(first_time) >= sysdate - 8)<br />
where round(((first_time - nexttime) * 24) * 60, 2) > 0<br />
order by sequence# desc;<br />
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25462274/viewspace-1936814/
,如需转载,请注明出处,否则将追究法律责任。