Method 2-explain Plan

Source: Internet
Author: User



1 Installation

$ ORACLE_HOME/rdbms/admin/utlxplan. SQL (UNIX) script generates a table. This program creates a table named plan_table.


2 run

Explain Plan [set statement_id [=] <string literal>] [into <table_name>]

For <SQL _statement>

Where:

Statement_id: A unique string that distinguishes the current execution plan from other execution plans stored in the same plan.

Table_name: the name of the plan table. Its structure is shown in the preceding figure. You can set this name as needed.

SQL _statement: a real SQL statement.


3. Run


S

QL> select * from table (dbms_xplan.display); plan_table_output partition plan hash value: 272002086 bytes | ID | operation | Name | rows | bytes | cost (% CPU) | time | minute | 0 | SELECT statement | 1 | 2 | 2 (0) | 00:00:01 | 1 | table access full | dual | 1 | 2 | 2 (0) | 00:00:01 | -------------------------------------------------------------------------- 8 rows selected.

Or

 
Select a. Operation, options, object_name, object_type, ID, parent_idfrom plan_table awhere statement_id = 'lastdao 'order by ID;


This article is from the "Tao Xing Shang Qian (Old Road) Space" blog, please be sure to keep this source http://daoye.blog.51cto.com/4190423/1431976

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.