<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    JUST DO IT ~

    我只想當(dāng)個(gè)程序員

    autotrace explain plan 安裝 oracle

    不廢話。


    C:\oracle\ora92\rdbms\admin

     腳本utlxplan.sql

    run @utlxplan

     

    rem
    rem $Header: utlxplan.sql 29-oct-2001.20:28:58 mzait Exp $ xplainpl.sql
    rem
    Rem Copyright (c) 1988, 2001, Oracle Corporation.  All rights reserved. 
    Rem NAME
    REM    UTLXPLAN.SQL
    Rem  FUNCTION
    Rem  NOTES
    Rem  MODIFIED
    Rem     mzait      10/26/01  - add keys and filter predicates to the

    plan table
    Rem     ddas       05/05/00  - increase length of options column
    Rem     ddas       04/17/00  - add CPU, I/O cost, temp_space columns
    Rem     mzait      02/19/98 -  add distribution method column
    Rem     ddas       05/17/96 -  change search_columns to number
    Rem     achaudhr   07/23/95 -  PTI: Add columns partition_{start, stop,

    id}
    Rem     glumpkin   08/25/94 -  new optimizer fields
    Rem     jcohen     11/05/93 -  merge changes from branch 1.1.710.1 -

    9/24
    Rem     jcohen     09/24/93 - #163783 add optimizer column
    Rem     glumpkin   10/25/92 -  Renamed from XPLAINPL.SQL
    Rem     jcohen     05/22/92 - #79645 - set node width to 128 (M_XDBI in

    gendef)
    Rem     rlim       04/29/91 -         change char to varchar2
    Rem   Peeler     10/19/88 - Creation
    Rem
    Rem This is the format for the table that is used by the EXPLAIN PLAN
    Rem statement.  The explain statement requires the presence of this
    Rem table in order to store the descriptions of the row sources.

    create table PLAN_TABLE (
     statement_id  varchar2(30),
     timestamp     date,
     remarks       varchar2(80),
     operation     varchar2(30),
     options        varchar2(255),
     object_node   varchar2(128),
     object_owner  varchar2(30),
     object_name   varchar2(30),
     object_instance numeric,
     object_type     varchar2(30),
     optimizer       varchar2(255),
     search_columns  number,
     id  numeric,
     parent_id numeric,
     position numeric,
     cost  numeric,
     cardinality numeric,
     bytes  numeric,
     other_tag       varchar2(255),
     partition_start varchar2(255),
            partition_stop  varchar2(255),
            partition_id    numeric,
     other  long,
     distribution    varchar2(30),
     cpu_cost numeric,
     io_cost  numeric,
     temp_space numeric,
            access_predicates varchar2(4000),
            filter_predicates varchar2(4000));

     

     


     create public synonym plan_table for plan_table ;

     grant all on plan_table to public ;





    創(chuàng)建 plustrace 角色

    cd /sqlplus/admin

     @plustrace

    grant plustrace to public ;








    posted on 2007-11-20 00:34 小高 閱讀(736) 評(píng)論(1)  編輯  收藏

    評(píng)論

    # re: autotrace explain plan 安裝 oracle 2007-11-26 16:43 小高

    1、使用sys用戶登陸

    2、執(zhí)行 $ORACLE_HOME/rdbms/admin/utlxplan.sql ,生成表。

    3、執(zhí)行 $ORACLE_HOME/sqlplus/admin/plustrce.sql 生成角色等。

    4、對(duì)需要使用該功能的用戶賦予角色。

    grant plustrace to public;


    序號(hào)

    命令

    解釋


    1

    SET AUTOTRACE OFF

    此為默認(rèn)值,即關(guān)閉Autotrace


    2

    SET AUTOTRACE ON

    產(chǎn)生結(jié)果集和解釋計(jì)劃并列出統(tǒng)計(jì)


    3

    SET AUTOTRACE ON EXPLAIN

    顯示結(jié)果集和解釋計(jì)劃不顯示統(tǒng)計(jì)


    4

    SETAUTOTRACE TRACEONLY

    顯示解釋計(jì)劃和統(tǒng)計(jì),盡管執(zhí)行該語(yǔ)句但您將看不到結(jié)果集


    5

    SET AUTOTRACE


    TRACEONLY STATISTICS

    只顯示統(tǒng)計(jì)




    Eg:SET AUTOTRACE ON, set timing on, alter session set time_statistics=true;


    三、Autotrace執(zhí)行計(jì)劃的各列的涵義

    序號(hào)

    列名

    解釋


    1

    ID_PLUS_EXP

    每一步驟的行號(hào)


    2

    PARENT_ID_PLUS_EXP

    每一步的Parent的級(jí)別號(hào)


    3

    PLAN_PLUS_EXP

    實(shí)際的每步


    4

    OBJECT_NODE_PLUS_EXP

    Dblink或并行查詢時(shí)才會(huì)用到




    四、AUTOTRACE Statistics常用列解釋

    序號(hào)

    列名

    解釋


    1

    db block gets

    從buffer cache中讀取的block的數(shù)量


    2

    consistent gets

    從buffer cache中讀取的undo數(shù)據(jù)的block的數(shù)量


    3

    physical reads

    從磁盤讀取的block的數(shù)量


    4

    redo size

    DML生成的redo的大小


    5

    sorts (memory)

    在內(nèi)存執(zhí)行的排序量


    7

    sorts (disk)

    在磁盤上執(zhí)行的排序量






    ORACLE :: 評(píng)論 (0) :: 靜態(tài)鏈接網(wǎng)址 :: 引用 (0)
    發(fā)表評(píng)論
      回復(fù)  更多評(píng)論   


    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     

    導(dǎo)航

    <2007年11月>
    28293031123
    45678910
    11121314151617
    18192021222324
    2526272829301
    2345678

    統(tǒng)計(jì)

    常用鏈接

    留言簿(3)

    隨筆分類(352)

    收藏夾(19)

    關(guān)注的blog

    手冊(cè)

    搜索

    積分與排名

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    主站蜘蛛池模板: 国产无遮挡无码视频免费软件| 亚洲综合激情另类小说区| 亚洲国产成+人+综合| 日韩精品免费在线视频| 亚洲精品无码不卡在线播放HE| fc2成年免费共享视频网站| 亚洲精品无码99在线观看| 曰批免费视频播放免费| 亚洲福利精品一区二区三区| 深夜免费在线视频| 亚洲色偷偷偷鲁综合| 免费无码又爽又刺激高潮软件 | 国产成人青青热久免费精品| 亚洲爆乳无码专区www| 天天摸天天操免费播放小视频| 亚洲熟妇无码av另类vr影视 | 国产亚洲精品a在线观看app| 91免费播放人人爽人人快乐| 亚洲AV无码无限在线观看不卡| 日本特黄a级高清免费大片| 污视频网站在线免费看| 亚洲自偷自拍另类图片二区| 国产精品成人免费视频网站京东 | 国产午夜免费高清久久影院| 亚洲AV无码AV日韩AV网站| 亚洲av无码不卡私人影院| 国内精自视频品线六区免费| 高清永久免费观看| 亚洲国产高清在线精品一区| 性做久久久久免费看| 中文字幕免费在线看线人| 亚洲精品无码久久久久APP | 亚洲精品在线免费观看| 在线观看亚洲精品福利片| 91在线手机精品免费观看| 亚洲精品无码永久在线观看男男 | baoyu777永久免费视频| 亚洲国产综合在线| 亚洲AV永久青草无码精品| 天天看免费高清影视| 在线观看的免费网站无遮挡|