Encountered in the execution of sql & # 039 how to solve the problem of is old version
Today, I will talk to you about how to solve the problem of 'PLAN_TABLE' is old version' encountered in the implementation of sql. Many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.
Resolve 'PLAN_TABLE' is old version'
Often encountered when analyzing sql execution plan
'PLAN_TABLE' is old version
The reason is that the execution plan analysis of toad was used, so the plan_table generated by its own script was executed.
Solution: recreate plan_table.
SQL > explain plan for select * from scott.emp
It has been explained.
SQL > select * from table (dbms_xplan.display)
PLAN_TABLE_OUTPUT
| | Id | Operation | Name | Rows | Bytes | Cost (% CPU) | |
| | 0 | SELECT STATEMENT | | 1 | 87 | 2 (0) | |
| | 1 | TABLE ACCESS FULL | EMP | 1 | 87 | 2 (0) | |
Note
-
-'PLAN_TABLE' is old version
SQL > drop table PLAN_TABLE
Table has been deleted.
SQL > @? / rdbms/admin/utlxplan
The table has been created.
SQL > explain plan for select * from scott.emp
It has been explained.
SQL > select * from table (dbms_xplan.display)
SQL > select * from table (dbms_xplan.display)
PLAN_TABLE_OUTPUT
Plan hash value: 3956160932
| | Id | Operation | Name | Rows | Bytes | Cost (% CPU) | Time |
| | 0 | SELECT STATEMENT | | 1 | 87 | 2 (0) | 00:00:01 |
| | 1 | TABLE ACCESS FULL | EMP | 1 | 87 | 2 (0) | 00:00:01 |
After reading the above, do you have any further understanding of how to solve the problem of 'PLAN_TABLE' is old version' encountered in the implementation of sql? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.