您好,登錄后才能下訂單哦!
這篇文章主要為大家展示了“數據庫中普通用戶如何調用dbms_xplan.display_cursor查看執行計劃”,內容簡而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓小編帶領大家一起研究并學習一下“數據庫中普通用戶如何調用dbms_xplan.display_cursor查看執行計劃”這篇文章吧。
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)
以上是“數據庫中普通用戶如何調用dbms_xplan.display_cursor查看執行計劃”這篇文章的所有內容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內容對大家有所幫助,如果還想學習更多知識,歡迎關注億速云行業資訊頻道!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。