Oracle 查询数据库一定事件范围内事件排序

select t.SQL_ID, t.EVENT,count(*)
  from v$active_session_history t
 where t.SAMPLE_TIME > to_timestamp('20180416090000', 'YYYYMMDDhh24miss')
   and t.SAMPLE_TIME < to_timestamp('20180416091600', 'YYYYMMDDhh24miss')
group by t.SQL_ID,t.EVENT order by count(*) desc
阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页