How many ways to view the execution plan for an Oracle SQL statement-SQL EXECUTE plan

Source: Internet
Author: User

To add, if you want to do a SQL automatic audit tool, where can I start?

1, through the Sql*plus tool in the explain PLAN for judgment, the use of Dbms_xplan. Display displays.

2, through the Sql*plus tool in the SET autotrace command display

3, Sql_trace, in the database global (performance problem, is basically a waste of options), or to the current session definition Sql_trace, or use Dbms_system. Set_sql_trace_in_session gets the sql_trace of the other session. Use Tkprof to parse the trace file to read the execution plan.

4, using 10046 Tracefile_identifier event acquisition

5, SQLT tool, according to the sql_id into the database to get a very detailed execution plan around this SQL, statistics, sub-cursors and other related information.

6, PL/SQL Developer, TOAD and other tools (where are their data?) Is it accurate? )

7, v$ view, as follows:

SELECT * from V$sql_plan

SELECT * from v$rsrc_plan_cpu_mth

SELECT * from V$sql_plan_statistics

SELECT * from V$sql_plan_statistics_all

SELECT * from V$sqlarea_plan_hash

SELECT * from V$rsrc_plan_history

How many ways to view the execution plan for an Oracle SQL statement-SQL EXECUTE plan

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.