oracle,Cannot SET AUTOTRACE解決問題__oracle

來源:互聯網
上載者:User
 1、SET AUTOTRACE參數

SET AUTOTRACE OFF ---------------- 不產生AUTOTRACE 報告,這是預設模式
SET AUTOTRACE ON EXPLAIN ------ AUTOTRACE只顯示最佳化器執行路徑報告
SET AUTOTRACE ON STATISTICS -- 只顯示執行統計資訊
SET AUTOTRACE ON ----------------- 包含執行計畫和統計資訊
SET AUTOTRACE TRACEONLY ------ 同set autotrace on,但是不顯示查詢輸出

2、只能在sql plus下執行

SQL> SET AUTOTRACE ON;
SQL> select count(*) from oz_member;

  COUNT(*)
----------
       472


執行計畫
----------------------------------------------------------

-------------------------------------------------------
| Id  | Operation        | Name  | Rows  | Cost (%CPU)|
-------------------------------------------------------
|   0 | SELECT STATEMENT |       |     1 |     1   (0)|
|   1 |  SORT AGGREGATE  |       |     1 |            |
|   2 |   INDEX FULL SCAN| PK1_1 |   472 |     1   (0)|
-------------------------------------------------------

Note
-----
   - 'PLAN_TABLE' is old version


統計資訊
----------------------------------------------------------
        193  recursive calls
          0  db block gets
         34  consistent gets
          0  physical reads
          0  redo size
        409  bytes sent via SQL*Net to client
        385  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          1  rows processed、

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.