set autotrace on [configure]
SQL> conn /as sysdba
Connected.
SQL> @?/rdbms/admin/utlxplan.sql
Table created.
SQL> @?/sqlplus/admin/plustrce.sql
SQL>
SQL> drop role plustrace;
Role dropped.
SQL> create role plustrace;
Role created.
SQL>
SQL> grant select on v_$sesstat to plustrace;
Grant succeeded.
SQL> grant select on v_$statname to plustrace;
Grant succeeded.
SQL> grant select on v_$mystat to plustrace;
Grant succeeded.
SQL> grant plustrace to dba with admin option;
Grant succeeded.
SQL>
SQL> set echo off
SQL>
SQL>
SQL> conn scott/bruce123
Connected.
SQL> set autotrace on
SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
SQL> conn / as sysdba
Connected.
SQL> grant plustrace to scott;
Grant succeeded.
SQL> conn scott/bruce123
Connected.
SQL> set autotrace on
SQL>
SQL> select max(id) from tt6;
MAX(ID)
----------
10053197
Execution Plan
----------------------------------------------------------
Plan hash value: 2149112514
-------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 13 | 185 (4)| 00:00:03 |
| 1 | SORT AGGREGATE | | 1 | 13 | | |
| 2 | INDEX FULL SCAN (MIN/MAX)| TT6_PK | 197K| 2503K| | |
-------------------------------------------------------------------------------------
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
4 recursive calls
0 db block gets
84 consistent gets
1 physical reads
0 redo size
413 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
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24237320/viewspace-1813345/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- set autotrace in SQL*PlusSQL
- Set autotrace命令及解釋
- 【優化】ORACLE set autotrace in SQL*Plus優化OracleSQL
- 開啟執行計劃set autotrace on
- set autotrace的用法和含意及區別
- 檢視sql執行計劃--set autotraceSQL
- EXPLAIN PLAN FOR 和 SET AUTOTRACE之間的差別AI
- 以scott使用者執行set autotrace 出錯
- 檢視sql執行計劃--set autotrace [final]SQL
- 使用set autotrace on 檢視資料庫執行計劃資料庫
- set autotrace on 產生不準確的執行計劃
- set autotrace的選項和計劃報告的屬性
- oracle10g_10.2.0.1_sql tuning_set autotrace配置OracleSQL
- Oracle 開啟SQL跟蹤執行SET AUTOTRACE ON命令時出錯OracleSQL
- Sql最佳化(十八) 調優工具(1)set autotrace和excute plan tableSQL
- 處理set autotrace故障又一例_ora-942_sp2-0611
- set autotrace on時報SP2-0618錯誤的問題解決案例
- [20120209] SET AUTOTRACE TRACEONLY EXPLAIN的問題.txtAI
- 【AUTOTRACE】SQL優化的重要工具--AUTOTRACESQL優化
- Oracle AutotraceOracle
- set autotrace on 時報SP2-0618、SP2-0611的解決方法
- sql中使用函式導致explain plan for和set autotrace得到執行計劃不準確SQL函式AI
- 使用普通使用者set autotrace on報錯SP2-0618: Cannot find the Session IdentifierSessionIDE
- [20121212]謹慎使用set autotrace traceonly檢視執行計劃[補充].txt
- 關於ORACLE AUTOTRACEOracle
- ORACLE 使用AUTOTRACE功能Oracle
- Autotrace 用法總結
- [20120112]謹慎使用set autotrace traceonly檢視執行計劃.txt
- Autotrace的配置與分析
- ORACLE 10G AUTOTRACEOracle 10g
- 關於檢視Oracle資料庫執行計劃的命令(set autotrace的用法和含意及區別[轉])Oracle資料庫
- rman configure
- 設定autotrace全過程
- 安裝並設定autotrace
- Autotrace的設定與使用
- 設定sql plus 的autotraceSQL
- Oracle最佳化工具——AutoTraceOracle
- ./configure 幫助