Common Methods for viewing Oracle execution plans-Series 2
Continued article: http://blog.csdn.net/bisal/article/details/38919181
3. AUTOTRACE Switch
Turn on AUTOTRACE in SQLPLUS to get the SQL Execution Plan.
The prompt shows that AUTOTRACE has several options:
OFF/ON/TRACEONLY/EXPLAIN/STATISTICS.
Lab:
1. Execute set autotrace on:
2. Execute set autotrace traceonly: <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + pgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20140917/201409170913524.png" alt = "\">
3. Execute set autotrace traceonly explain:
4. Execute set autotrace traceonly statistics:
AUTOTRACE switch Summary:
OFF: The default option. Only the results are displayed when the current session executes the SQL statement.
Set autotrace off (set autot off)
ON: In addition to the SQL Execution results, the corresponding execution plan and resource consumption are displayed.
Set autotrace on (set autot on)
TRACEONLY: Only the number of SQL Execution results is displayed, and the content of the execution results is not displayed. It is applicable to screen-flushing SQL statements and shows the execution plan and resource consumption.
Set autotrace traceonly (set autot trace)
EXPLAIN: Only the SQL Execution Plan is displayed, and the SQL resource consumption and execution results are not displayed.
Set autotrace traceonly explain (set autot trace exp)
STATISTICS: Only the number of SQL Execution results and resource consumption are displayed, and the Execution Plan is not displayed.
Set autotrace traceonly statistics (set autot trace stat)
? Not complete...
? To Be Continued...