oracle 10g R2 autotrace 增強

paulyibinyi發表於2008-05-07

C:\Documents and Settings\paul>sqlplus "/as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 5月 7 16:36:53 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


連線到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> @ D:\oracle\product\10.2.0\db_1\rdbms\admin\utlxplan.sql

表已建立。

SQL> set autot on
SQL> select count(*) from v$session;

  COUNT(*)
----------
        26


執行計劃
----------------------------------------------------------
Plan hash value: 2376410614

--------------------------------------------------------------------------------

-------------

| Id  | Operation                 | Name            | Rows  | Bytes | Cost (%CPU

)| Time     |

--------------------------------------------------------------------------------

-------------

|   0 | SELECT STATEMENT          |                 |     1 |    65 |     0   (0

)| 00:00:01 |

|   1 |  SORT AGGREGATE           |                 |     1 |    65 |
 |          |

|   2 |   NESTED LOOPS            |                 |     1 |    65 |     0   (0

)| 00:00:01 |

|*  3 |    FIXED TABLE FULL       | X$KSUSE         |     1 |    52 |     0   (0

)| 00:00:01 |

|*  4 |    FIXED TABLE FIXED INDEX| X$KSLED (ind:2) |     1 |    13 |     0   (0

)| 00:00:01 |

--------------------------------------------------------------------------------

-------------


Predicate Information (identified by operation id):
---------------------------------------------------

   3 - filter("S"."INST_ID"=USERENV('INSTANCE') AND BITAND("S"."KSSPAFLG",1)<>0
AND

              BITAND("S"."KSUSEFLG",1)<>0)
   4 - filter("S"."KSUSEOPC"="E"."INDX")


統計資訊
----------------------------------------------------------
          1  recursive calls
          0  db block gets
          0  consistent gets
          0  physical reads
          0  redo size
        408  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

SQL>

以前9i 時要顯示這些必須透過table(dbms_xplan.display)  工具

現在10g一步到位 呵呵

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-263020/,如需轉載,請註明出處,否則將追究法律責任。

相關文章