Oracle 9i与10g中plan_table的不同

来源:pcdog 作者:佚名 2008-02-29 出处:pcdog.com

access  linux  oracle  oracle 10g  solaris  
Oracle 9i与10g中plan_table的不同:
 
  Oracle 9i中查看plan_table:

 
  

 sys@DG1> select * from v$version;

BANNER
--------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
PL/SQL Release 9.2.0.4.0 - Production
CORE 9.2.0.3.0 Production
TNS for Linux: Version 9.2.0.4.0 - Production
NLSRTL Version 9.2.0.4.0 - Production

sys@DG1> set autotrace on explain;
sys@DG1> select * from plan_table;

no rows selected


Execution Plan
----------------------------------------------------------
0 SELECT STATEMENT Optimizer=CHOOSE
1 0 TABLE ACCESS (FULL) OF 'PLAN_TABLE'


 
  Oracle 10g中查看plan_table:
 
  

 SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod
PL/SQL Release 10.2.0.2.0 - Production
CORE 10.2.0.2.0 Production
TNS for Solaris: Version 10.2.0.2.0 - Production
NLSRTL Version 10.2.0.2.0 - Production

SQL> set autotrace on explain
SQL> select * from plan_table;

no rows selected


Execution Plan
----------------------------------------------------------
Plan hash value: 103984305

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

| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time
|

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

| 0 | SELECT STATEMENT | | 1 | 11081 | 2 (0)| 00:00:01
|

| 1 | TABLE ACCESS FULL| PLAN_TABLE$ | 1 | 11081 | 2 (0)| 00:00:01
|

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


Note
-----
- dynamic sampling used for this statement


 
  结论
 
  Oracle 10g中不再需要创建plan_table表,因为它会自动创建一个数据字典表PLAN_TABLE$.

上一篇:Data Guard学习之物理standby创建步骤
下一篇:如何检测Oracle的可用性和表空间容量