Error: cannot fetch last explain plan from PLAN_TABLE
/********構建測試表並插入記錄***************/
SQL> select a from t_sys;
A
----------
1
/*****可以顯示上述sql的執行計劃**********/
SQL> select * from table(dbms_xplan.display_cursor);--顯示cursor cache中的執行計劃,即shared pool
PLAN_TABLE_OUTPUT
------------------------------------------------------------------------
SQL_ID gg5wbsdrssnvm, child number 0
-------------------------------------
select a from t_sys
Plan hash value: 789675691
------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time
------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 3 (100)|
| 1 | TABLE ACCESS FULL| T_SYS | 1 | 13 | 3 (0)| 00:00:0
PLAN_TABLE_OUTPUT
------------------------------------------------------------------------
------------------------------------------------------------------------
Note
-----
- dynamic sampling used for this statement (level=2)
17 rows selected.
/******報錯*************/
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
------------------------------------------------------------------------
Error: cannot fetch last explain plan from PLAN_TABLE
/****查閱官方手冊display函式顯示plan_table中的執行計劃,當然你也可以指定你的執行計劃表,但你的執行計劃表與要plan_table結構相同*****/
DISPLAY Function
This table function displays the contents of the plan table.
In addition, you can use this table function to display any plan (with or without statistics) stored
in a table as long as the columns of this table are named the same as columns of the plan table
(or V$SQL_PLAN_STATISTICS_ALL if statistics are included). You can apply a predicate on the
specified table to select rows of the plan to display.
SQL> explain plan for select * from t_oa;
Explained
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
Plan hash value: 3582308059
--------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time
--------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 2 | 26 | 2 (0)| 00:00:01
| 1 | PX COORDINATOR | | | | |
| 2 | PX SEND QC (RANDOM)| :TQ10000 | 2 | 26 | 2 (0)| 00:00:01
| 3 | PX BLOCK ITERATOR | | 2 | 26 | 2 (0)| 00:00:01
| 4 | TABLE ACCESS FULL| T_OA | 2 | 26 | 2 (0)| 00:00:01
--------------------------------------------------------------------------------
Note
-----
- dynamic sampling used for this statement (level=2)
15 rows selected
SQL> select count(*) from plan_table;
COUNT(*)
----------
5
SQL>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-757211/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【Explain Plan】10g中的PLAN_TABLE$臨時表AI
- Oracle -- 深入體會PLAN_TABLE、PLAN_TABLE$Oracle
- Oracle --- PLAN_TABLE$和PLAN_TABLE區別Oracle
- Explain PlanAI
- 【筆記】使用 plan_table筆記
- explain plan VS execution planAI
- USE EXPLAIN PLANAI
- 解決 'PLAN_TABLE' is old version
- Oracle EXPLAIN PLAN用法OracleAI
- Explain for the Statistics of Execution PlanAI
- explain plan 的用法AI
- dbms_xplan.display_cursor 報錯 NOTE: cannot fetch plan for SQL_IDSQL
- 資料庫升級後‘PLAN_TABLE資料庫
- oracle explain plan for的用法OracleAI
- ORACLE SQL調優之'PLAN_TABLE' is old versionOracleSQL
- ORACLE EXPLAIN PLAN的總結OracleAI
- Use the statspack to generate the accurate explain planAI
- explain plan 學習記錄AI
- MySQL案例09:Last_IO_Error: Got fatal error 1236 from master when reading data from binary logMySqlASTErrorGo
- Using Statspack to Record Explain Plan DetailsAI
- 用EXPLAIN PLAN 分析SQL語句AISQL
- "The Alberta Plan for AI Research" - "Research Plan" from Richard SuttonAI
- NOTE: cannot fetch plan for SQL_ID_在plsql developer無法獲取sql執行計劃SQLDeveloper
- mysql主從同步失敗Last_IO_Error: Got fatal error 1236 from master解決方法MySql主從同步ASTErrorGo
- Oracle執行計劃Explain Plan 如何使用OracleAI
- oracle 使用explain plan分析查詢語句OracleAI
- EXPLAIN PLAN and SQL*PLUS AUTOTRACE may not generate actual plansAISQL
- toad顯示explain plan的問題AI
- Oracle 執行計劃(Explain Plan) 說明OracleAI
- autotrace explain plan 相關引數解釋AI
- Oracle 執行計劃(Explain Plan) 說明OracleAI
- An error from listenerError
- JSON parse error: Cannot deserialize value of type `java.time.LocalDateTime` from StringJSONErrorJavaLDA
- ERROR 1548 (HY000): Cannot load from mysql.proc. The table is probably corruptedErrorMySql
- EXPLAIN PLAN FOR 和 SET AUTOTRACE之間的差別AI
- 使用EXPLAIN PLAN來檢視執行計劃AI
- TOAD中檢視執行計劃(Explain Plan)AI
- (轉)oracle效能工具包Explain plan、Autotrace、TkprofOracleAI