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

How does ORACLE view the script execution plan

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly shows you "ORACLE how to view the script execution plan", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "ORACLE how to view the script execution plan" this article.

There are three ways to view:

1. EXPLAIN

2. AUTOTRACE

3. PL/SQL tool

EXPLAIN:

1. Installation:

UNIX: $ORACLE_HOME/rdbms/admin\ ultxplan.sql

Windows:%ORACLE_HOME%\ rdbms\ admin\ ultxplan.sql

two。 Establish:

Set feedback on

Explain plan set statement_id='T_TEST' for select * from hr.employees

3. View:

Select * from plan_table

AUTOTRACE:

1. Installation:

UNIX: $ORACLE_HOME/rdbms/admin\ ultxplan.sql

Windows:%ORACLE_HOME%\ rdbms\ admin\ ultxplan.sql

two。 To establish a synonym or authorize:

Create public synonym plan_table for plan_table;-- establishes synonyms

Grant all on plan_table to public;-- authorizes all users

3. Run the script:

UNIX:$ORACLE_HOME/sqlplus/admin/plustrce.sql

Windows:%ORACLE_HOME%\ sqlplus\ admin\ plustrce.sql

Grant plustrace to public

4. Use:

View the execution plan:

Set autotrace on explain

Select * from hr.employees

View the statistical results:

Set autotrace on statictics

Select * from hr.employees

The above is all the contents of the article "how to check the script execution Plan for ORACLE". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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

Servers

Wechat

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

12
Report