要到数据库管理视图中去看,有么就用TOAD这样的工具!

解决方案 »

  1.   


         运行utlxplan.sql. 建立plan 表           针对特定SQL语句,使用 explain plan set statement_id = 'tst1' into plan_table            运行utlxplp.sql 或 utlxpls.sql察看explain plan还可以用
    set autotrace on
      

  2.   

    我记着好像是再哪个命令后加SQL语句
      

  3.   

    welyngj(平平淡淡):
          这个utlxplan.sql在哪里?能不能在说详细点呀!还有哪个set autotrace on怎么用呀!
    我对这些还不是很懂,麻烦大家了!
    谢谢!
      

  4.   

    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
      

  5.   

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