See several common methods of Oracle execution plan-Series 2

Source: Internet
Author: User

Cont.: http://blog.csdn.net/bisal/article/details/38919181


3. Autotrace Switch

Open the autotrace switch in sqlplus to get the SQL execution plan.

From the tip you can see that Autotrace has several options:

Off/on/traceonly/explain/statistics.


Experiment:

1. Perform set AUTOTRACE on:



2. Execute set AUTOTRACE traceonly:



3. Execute set AUTOTRACE traceonly EXPLAIN:



4. Execute set AUTOTRACE traceonly STATISTICS:



autotrace Switch Summary :

OFF: Default option, the current session execution SQL will only display the results.

Set AUTOTRACE off (set Autot off)

on: In addition to displaying the execution SQL results, the corresponding execution plan and resource consumption are also displayed.

Set AUTOTRACE on (set Autot on)

traceonly: Displays only the number of SQL execution results, does not display the contents of the execution results, applies to the brush screen of SQL, and also shows the execution plan and resource consumption.

Set AUTOTRACE traceonly (set Autot TRACE)

EXPLAIN: Displays only the SQL execution plan and does not display the resource consumption and execution results of SQL.

Set AUTOTRACE traceonly EXPLAIN (set Autot TRACE EXP)

STATISTICS: Displays only the number of execution results and resource consumption for SQL, and does not show the execution plan.

Set AUTOTRACE traceonly STATISTICS (set Autot TRACE STAT)


To be Continued ...

? To be Continued ...

See several common methods of Oracle execution plan-Series 2

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.