ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 确定引起最多等待的SQL语句

确定引起最多等待的SQL语句

原创 Linux操作系统 作者:yagerya 时间:2013-06-22 21:50:33 0 删除 编辑
SYS@orcl> l
  1  select ash.user_id,
  2  u.username,
  3  s.sql_text,
  4  sum(ash.wait_time + ash.time_waited) ttl_wait_time
  5  from v$active_session_history ash, v$sqlarea s,dba_users u
  6  where ash.sample_time between sysdate - 60/2880 and sysdate
  7  and ash.sql_id = s.sql_id
  8  and ash.user_id = u.user_id
  9  group by ash.user_id ,s.sql_text,u.username
 10* order by ttl_wait_time
SYS@orcl>

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22126868/viewspace-764614/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: awrrpt_1_9474_9475.txt
请登录后发表评论 登录
全部评论

注册时间:2012-10-21

  • 博文量
    20
  • 访问量
    58545