@%oracle_home\rdmbs\admin\utlexpt1.sql然后
set autotrace on

解决方案 »

  1.   

    sorry !是@%oracle_home\rdmbs\admin\utlxplan.sql
    2.     运行utlxplan.sql. 建立plan 表           针对特定SQL语句,使用 explain plan set statement_id = 'tst1' into plan_table            运行utlxplp.sql 或 utlxpls.sql察看explain plan
      

  2.   

    SET AUTOT[RACE] {ON|OFF|TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]]
    Displays a report on the execution of successful SQL DML statements (SELECT, INSERT, UPDATE or DELETE). The report can include execution statistics and the query execution path.OFF does not display a trace report. ON displays a trace report. TRACEONLY displays a trace report, but does not print query data, if any. EXPLAIN shows the query execution path by performing an EXPLAIN PLAN. STATISTICS displays SQL statement statistics. Information about EXPLAIN PLAN is documented in the Oracle9i SQL Reference manual.Using ON or TRACEONLY with no explicit options defaults to EXPLAIN STATISTICS.The TRACEONLY option may be useful to suppress the query data of large queries. If STATISTICS is specified, SQL*Plus still fetches the query data from the server, however, the data is not displayed.The AUTOTRACE report is printed after the statement has successfully completed.Information about Execution Plans and the statistics is documented in the Oracle9i Database Performance Tuning Guide and Reference manual.When SQL*Plus produces a STATISTICS report, a second connection to the database is automatically created. This connection is closed when the STATISTICS option is set to OFF, or you log out of SQL*Plus.The formatting of your AUTOTRACE report may vary depending on the version of the server to which you are connected and the configuration of the server.AUTOTRACE is not available when FIPS flagging is enabled.See "Tracing Statements" for more information on AUTOTRACE.
    参考:
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1012209
      

  3.   

    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch9.htm#1006527