1. Set autotrace Parameters
Set autotrace off ---------------- do not generate autotrace Report, which is the default mode
Set autotrace on explain ------ autotrace only displays the optimizer execution path report
Set autotrace on statistics -- display only execution statistics
Set autotrace on ----------------- contains the execution plan and statistics
Set autotrace traceonly ------ same as set autotrace on, but no query output is displayed
2. It can only be executed under SQL plus
SQL> set autotrace on;
SQL> select count (*) from oz_member;
Count (*)
----------
472
Execution Plan
----------------------------------------------------------
-------------------------------------------------------
| 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
Statistics
----------------------------------------------------------
193 recursive cballs
0 dB block gets
34 consistent gets
0 physical reads
0 redo size
409 bytes sent via SQL * Net to client
385 bytes encoded ed via SQL * Net From Client
2 SQL * Net roundtrips to/from client
0 sorts (memory)
0 sorts (Disk)
1 rows processed,