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