View the method of implementing the plan [learn and summarize on the basis of our predecessors]
Exp:create table T1 as select * from dba_objects
Create table T2 as select * from dba_objects
In general, in a development environment, it is necessary for the institute to "compose" the implementation plan of the sql.
In the process of learning and summary, the individual analyzes the following methods to view the estimate and the actual implementation of the plan, and summarizes it.
Usually, in PL/SQL developer, we can just run the execution plan view method that comes with oracle [method 3].
In the command line sqlplus, use [method 1].
Other methods can be used as a reference to understand the grammar.
-
Method in 1:sqlplus
Set autotrace on select * from T1 where t1.object_id > key Configuration > File / New / Explain Plan Window exp: ctrl + 3 | default F5 [depending on your habits, I am used to using the first shortcut]
-
Method 4: look up SELECT * from T1 journal T2 WHERE t1.objectcorrecidpublication 2.objectclassiid through the data dictionaries v$sql and v$sql_plan; select sql_text,sql_id,hash_value,child_number from v$sql where sql_text like'% SELECT * from T1 journal T2% publication; select * from table (dbms_xplan.display_cursor ('2rqyd7uh0g6pccode 2684852908)) -- when the above cannot be found, it means that display_cursor is not included and needs to be queried by the following method
SELECT * from v$sql_plan WHERE sql_id = '2rqyd7uh0g6pc'
-
Method 5: check through dbms_xplan.display_awr that # VERSION_COUNT represents several different execution plans SELECT * from T1 authoring T2 WHERE t1.objectobjectcorrecidaccount2.objectclassiid; select sql_text,sql_id,hash_value,child_number from v$sql where sql_text like'% select * from emp%' # View all the historical execution plans of the specified SQL, provided that the execution plans of the SQL are collected into the AWR Repository select * from table (dbms_xplan.display_awr ('sql_id'))
Select * from table (dbms_xplan.display_awr ('2rqyd7uh0g6pc'))
-