Common Methods for viewing Oracle execution plans-Series 2

Source: Internet
Author: User

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...

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.