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/
,如需转载,请注明出处,否则将追究法律责任。