ITPub博客

首页 > 数据库 > Oracle > oracle 11g 性能最差的SQL

oracle 11g 性能最差的SQL

原创 Oracle 作者:rovige 时间:2015-07-21 19:42:08 0 删除 编辑
select /*+ ordered */
distinct sw.event,
         sw.sid,
         s.KSUUDNAM username,
         s.KSUSEPNM program,
         -- sw.state, sw.seconds_in_wait seconds,
         sw.state,
         sw.wait_time seconds,
         sw.p1,
         sw.p2,
         sw.p3,
         sa.kglnaobj  last_sql
  from sys.v$session_wait sw, sys.x$ksuse s, sys.x$kglob sa
 where sw.event not in ('rdbms ipc message',
                        'smon timer',
                        'pmon timer',
                        'SQL*Net message from client',
                        'SQL*Net message to client',
                        'lock manager wait for remote message',
                        'ges remote message',
                        'client message',
                        'SQL*Net more data from client',
                        'pipe get',
                        'Null event',
                        'PX Idle Wait',
                        'single-task message',
                        'wakeup time manager')
   and s.KSUUDNAM <> 'SYS'
   and (sw.sid = s.KSUSENUM)
   and (s.KSUSESQH = sa.KGLNAHSH)
 order by sw.event, sw.sid

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

下一篇: ORACLE 11G SQL 调优
请登录后发表评论 登录
全部评论

注册时间:2015-07-09

  • 博文量
    21
  • 访问量
    68918