• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 查找消耗CPU較大的sql語句

    發表于:2007-05-25來源:作者:點擊數: 標簽:sql查找大的消耗CPU
    查找消耗CPU較大的 sql 語句 一、使用 unix 系統命令查看資源 #sar 1 9 12:15:27 73 27 0 0 12:15:28 70 30 0 0 12:15:29 80 20 0 0 12:15:30 84 16 0 0 12:15:31 21 5 1 73 #top TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND ? 23093 o

    查找消耗CPU較大的sql語句

    一、使用unix系統命令查看資源

    #sar 1 9

    12:15:27      73      27       0       0
    12:15:28      70      30       0       0
    12:15:29      80      20       0       0
    12:15:30      84      16       0       0
    12:15:31      21       5       1      73

    #top


     TTY     PID USERNAME PRI NI   SIZE    RES STATE    TIME %WCPU  %CPU COMMAND
      ?    23093 oracle   154 20 29748K  3112K run   20:53  4.59  4.58 oraclebv
      ?    23087 oracle   154 20 29636K  3016K run   24:18  0.93  0.93 oraclebv

    二、使用oracle數據字典查找sql

    SQL>set line 240
    SQL>set verify off
    SQL>column sid format 999
    SQL>column pid format 999
    SQL>column S_# format 999
    SQL>column username format A9 heading "ORA User"
    SQL>column program  format a29
    SQL>column SQL format a60
    SQL>COLUMN OSname format a9 Heading "OS User"
    SQL>SELECT P.pid pid,S.sid sid,P.spid spid,S.username username,
    S.osuser osname,P.serial# S_#,P.terminal,P.program  program,
    P.background,S.status,a.sql_text SQL
    FROM v$process P, v$session S,v$sqlarea A WHERE P.addr = s.paddr
    AND S.sql_address = a.address (+)  AND P.spid LIKE '%&1%';

    MILY: "Times New Roman"; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋體; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">Enter value for 1: 23209(系統消耗較大進程id)

    找到結果:

    select * from clearcase/" target="_blank" >cc_por where status=1 and deleted=0

    使用autotrace分析語句。

    sql>set timing on

    sql>set autotrace on

    sql>select * from cc_por where status=1 and deleted=0;

    根據結果進行分析和改進。


    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>