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 do ordinary users call dbms_xplan.display_cursor to view the execution plan in the database

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "how ordinary users in the database call dbms_xplan.display_cursor to view the execution plan". The content is simple and easy to understand, and the organization is clear. I hope it can help you solve your doubts. Let Xiaobian lead you to study and learn this article "how ordinary users in the database call dbms_xplan.display_cursor to view the execution plan".

SQL> grant select on v_$session to mims;

SQL> grant select on v_$sql to mims;

SQL> grant select on v_$sql_plan to mims;

SQL> SELECT /*+ gather_plan_statistics */ SECTION ,

2 item

3 FROM eqrecipeitemmonitoring

4 WHERE eqpid = '2SOL15'

5 AND unitid = 'FB01'

6 AND recipeid = '480FN01-SC12-G2C8-SR'

7 AND filename ='Lightening.dat';

SECTION ITEM

-------------------------------------------------- ----------------------------------------------------------------------------------------------------

Lightening Data Controller ID 0

Lightening Data Controller ID 1

Lightening Data Controller ID 2

Lightening Data Controller ID 3

SQL> select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS LAST'));

PLAN_TABLE_OUTPUT

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------

SQL_ID 2mg58m5jxsw9v, child number 1

-------------------------------------

SELECT /*+ gather_plan_statistics */ SECTION , item FROM

eqrecipeitemmonitoring WHERE eqpid = :"SYS_B_0" AND unitid =

:"SYS_B_1" AND recipeid = :"SYS_B_2" AND filename =:"SYS_B_3"

Plan hash value: 2230633342

---------------------------------------------------------------------------------------------------------------------

| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers |

---------------------------------------------------------------------------------------------------------------------

| 0 | SELECT STATEMENT | | 1 | | 4 |00:00:00.01 | 43 |

|* 1 | TABLE ACCESS BY INDEX ROWID | EQRECIPEITEMMONITORING | 1 | 1 | 4 |00:00:00.01 | 43 |

| 2 | BITMAP CONVERSION TO ROWIDS | | 1 | | 12 |00:00:00.01 | 33 |

| 3 | BITMAP AND | | 1 | | 1 |00:00:00.01 | 33 |

| 4 | BITMAP CONVERSION FROM ROWIDS| | 1 | | 1 |00:00:00.01 | 22 |

|* 5 | INDEX RANGE SCAN | MONITORING_RECIPEID | 1 | 4778 | 4057 |00:00:00.01 | 22 |

| 6 | BITMAP CONVERSION FROM ROWIDS| | 1 | | 1 |00:00:00.01 | 11 |

|* 7 | INDEX RANGE SCAN | MONITORING_FILENAME | 1 | 4778 | 1814 |00:00:00.01 | 11 |

---------------------------------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):

---------------------------------------------------

1 - filter(("UNITID"=:SYS_B_1 AND "EQPID"=:SYS_B_0))

5 - access("RECIPEID"=:SYS_B_2)

7 - access("FILENAME"=:SYS_B_3)

The above is "how to call dbms_xplan.display_cursor to view execution plan in database by ordinary users", all contents of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to 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

Database

Wechat

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

12
Report