Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

View the method of implementing the plan [learn and summarize on the basis of our predecessors]

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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'))

-

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report