Oracle -- 深入體會PLAN_TABLE、PLAN_TABLE$

dbhelper發表於2015-01-17

         

註釋

PLAN_TABLE is the default table for results of the EXPLAIN PLAN statement. It is created by utlxplan.sql, and it contains one row for each step in the execution plan.    ---&gt session1:commit,session2:可檢視資料

PLAN_TABLE$ is a global temporary table accessible from any schema .It is created by catplan.sql ,It also creates the plan_id sequence number.                           ---&gt 臨時表 session1:commit,session2:不可檢視資料



深入理解plan_table[$]表 

     ---&gt  1)刪除全部包含plan_table所有物件...
     ---&gt  2)檢視執行計劃,看撥錯情況...對報錯進行10024事件跟蹤 進行分析
     ---&gt  3)解決 報錯 ..
     ---&gt  4-1)若sys使用者存在plan_table,plan_table$基表的公有同義詞 也存在會優先選擇哪個表呢?
     ---&gt  4-2)若普通使用者存在plan_table,plan_table$基表的公有同義詞 也存在會優先選擇哪個表呢?
     ---&gt  5  2個PLAN_TABLE【$】表建立路徑/指令碼詳情  
     ---&gt  總結(2個表區別

---&gt  1)查詢包含plan_table物件的SQL:
SELECT (CASE
         WHEN OBJECT_TYPE = 'TABLE' THEN
          'DROP TABLE ' || OWNER || '.' || OBJECT_NAME || ' PURGE;'
         WHEN OBJECT_TYPE = 'SYNONYM' AND OWNER = 'PUBLIC' THEN
          'DROP PUBLIC SYNONYM ' || OBJECT_NAME || ' PURGE;'
         WHEN OBJECT_TYPE = 'SYNONYM' AND OWNER != 'PUBLIC' THEN
          'DROP SYNONYM ' || OBJECT_NAME || ' PURGE;'
       END)
  FROM DBA_OBJECTS T
 WHERE T.OBJECT_NAME LIKE 'PLAN_TABLE%' ;   --&gt 查詢包含plan_table物件的SQL

SQL > drop table SYS.PLAN_TABLE$;   --&gt  刪除基表

Table dropped

SQL > drop table plan_table;         --&gt  刪除普通表

Table dropped

SQL > drop PUBLIC synonym PLAN_TABLE;   --&gt(若不刪除同義詞 explain for 會報錯ORA-00980: 同義詞轉換不再有效 )

Synonym dropped

SQL >
  
總結:
   嚴格要求刪除全部包含plan_table所有物件...是因為生成執行計劃時,後臺會向plan_table物件[可能是普通表/同義詞..等]insert資料,若存在,將不會報錯...體驗不出plan_table的效果~


---&gt  2)檢視執行計劃,看撥錯情況...對報錯進行10046事件跟蹤 進行分析



1)
plan_table 物件全部刪除後, 檢視select 1 from dual 的執行計劃:
SQL>  explain plan for select 1 from dual;
explain plan for select 1 from dual
                                *
第 1 行出現錯誤:
ORA-02402: 未找到 PLAN_TABLE                    --- > 其實已經說明白了...沒plan_table物件產生執行計劃...


2)10046事件跟蹤下報錯資訊

 ①  確認10046事件跟蹤位置
SQL> SELECT VALUE  FROM V$PARAMETER WHERE NAME = 'user_dump_dest' ;   --- > 檢視trace檔案路徑

VALUE
------------------------------------------------------------------------------------------------------------------------------
E:\ORACLE\PRODUCT\10.2.0\DB_1\ADMIN\ORCL\UDUMP

SQL> exit
從 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 斷開

E:\oracle\product\10.2.0\db_1\BIN>del E:\ORACLE\PRODUCT\10.2.0\DB_1\ADMIN\ORCL\UDUMP\*  --- > 刪除下所有檔案,方便查詢每次生產的檔案
E:\ORACLE\PRODUCT\10.2.0\DB_1\ADMIN\ORCL\UDUMP\*, 是否確認(Y/N)? y  

E:\oracle\product\10.2.0\db_1\BIN>dir E:\ORACLE\PRODUCT\10.2.0\DB_1\ADMIN\ORCL\UDUMP  --- > 檢視資料夾物件資訊...
.......
2014/08/29  14:55              .
2014/08/29  14:55              ..
               0 個檔案              0 位元組
               2 個目錄 45,554,696,192 可用位元組

 ②  開始10046事件跟蹤
E:\oracle\product\10.2.0\db_1\BIN>sqlplus.exe / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on 星期五 8月 29 14:56:06 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


連線到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> alter session set events '10046 trace name context forever, level 12';    --- > 開啟10046 事件跟蹤

會話已更改。

已用時間:  00: 00: 00.10
SQL> explain plan for select 1 from dual;                                                    --- > 操作 
explain plan for select 1 from dual
                               *
第 1 行出現錯誤:
ORA-02402: 未找到 PLAN_TABLE


SQL> alter session set events '10046 trace name context off';                       --- > 關閉10046 事件跟蹤

會話已更改。

SQL> exit
從 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 斷開

E:\oracle\product\10.2.0\db_1\BIN>dir E:\ORACLE\PRODUCT\10.2.0\DB_1\ADMIN\ORCL\UDUMP
驅動器 E 中的卷是 E
卷的序列號是 38DC-C2C9

E:\ORACLE\PRODUCT\10.2.0\DB_1\ADMIN\ORCL\UDUMP 的目錄

2014/08/29  14:56              .
2014/08/29  14:56              ..
2014/08/29  14:56             6,458 orcl_ora_9220.trc                                  ---&gt 生成的檔案
               1 個檔案          6,458 位元組
               2 個目錄 45,554,688,000 可用位元組

 ③  檢視10046事件跟蹤內容:
=====================
PARSING IN CURSOR #3 len=35 dep=0 uid=0 oct=50 lid=0 tim=281039119221 hv=1972993869 ad='1d4a43dc'
explain plan for select 1 from dual
END OF STMT
PARSE #3:c=0,e=32223,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=281039119218
BINDS #3:
=====================
PARSE ERROR #2:len=587 dep=1 uid=0 oct=2 lid=0 tim=281039135946 err=942  ---&gt (ORA-00942: 表或檢視不存在)
insert into plan_table (statement_id, timestamp, operation, options,object_node, object_owner, object_name, object_instance, object_type,search_columns, id, parent_id, position, other,optimizer, cost, cardinality, bytes, other_tag, partition_start, partition_stop, partition_id, distribution, cpu_cost, io_cost, temp_space, access_predicates, filter_predicates, projection, time, qblock_name, object_alias, plan_id, depth, remarks, other_xml ) values(:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23,:24,:25,:26,:27,:28,:29,:30,:31,:32,:33,:34,:35,:36)
EXEC #3:c=0,e=16568,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=281039137106
ERROR #3:err=2402 tim=28104338    ---err=2402  對應報錯ORA-02402: 未找到 PLAN_TABLE
WAIT #3: nam='SQL*Net break/reset to client' ela= 3 driver id=1111838976 break?=1 p3=0 obj#=-1 tim=281039137622
WAIT #3: nam='SQL*Net break/reset to client' ela= 61 driver id=1111838976 break?=0 p3=0 obj#=-1 tim=281039137920
WAIT #3: nam='SQL*Net message to client' ela= 1 driver id=1111838976 #bytes=1 p3=0 obj#=-1 tim=281039138206
WAIT #3: nam='SQL*Net message from client' ela= 193 driver id=1111838976 #bytes=1 p3=0 obj#=-1 tim=281039138936
=====================

分析:
plan_table[$] 說簡單就是檢視執行計劃用的表,如庫中沒有該物件(或沒該物件的許可權),估算的執行計劃都是不可以用.

 除本次實驗’explain plan for ’ 還包括:

 (使用Toad、PL/SQL Developer工具 、autotrace  且用法如下:

用法: SET AUTOT[RACE] {OFF | ON | TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]]

SET AUTOT[RACE] OFF 停止AutoTrace   --預設模式

SET AUTOT[RACE] ON 開啟AutoTrace,顯示AUTOTRACE資訊和SQL執行計劃結果

SET AUTOT[RACE] TRACEONLY 僅顯示執行計劃和統計資訊,執行SQL但不顯示SQL  =SET AUTOT[RACE] ON 

SET AUTOT[RACE] ON EXPLAIN 開啟AutoTrace,僅顯示AUTOTRACE的EXPLAIN資訊

SET AUTOT[RACE] ON STATISTICS開啟AutoTrace,僅顯示AUTOTRACE的STATISTICS資訊

SET AUTOTRACE ON EXPLAIN ------SELECT就不執行SQL ,(dml 執行),只顯示執行計劃(只顯示最佳化器執行路徑報告 )

SET AUTOTRACE ON STATISTICS -- 執行SQL,只顯示統計資訊

SET AUTOTRACE ON ---------執行SQL 且 包含執行計劃和統計資訊 
   

 **(plan_table 執行計劃是估算的,從記憶體v$..檢視得到的執行計劃是真實的




---&gt  3)如何解決報錯

   
   解決很簡單,,報錯說物件不存在,那麼建立就好了 ,怎麼建立呢,文章頭部一說2個表對應的指令碼是什麼
 1)生成PLAN_TABLE[$] 表
SQL> @?/rdbms/admin/utlxplan.sql   ------&gt或者 @?/rdbms/admin/catplan.sql(包括grant select, insert, update, delete on PLAN_TABLE$ to PUBLIC;和create or replace public synonym PLAN_TABLE
表已建立。
  
 2)開啟10046事件跟蹤 看下操作內容.....
      如上有如下命令是什麼 在此不說了...
SQL> alter session set events '10046 trace name context forever, level 12';

會話已更改。

SQL> explain plan for select 1 from dual;

已解釋。

SQL> alter session set events '10046 trace name context off';

會話已更改。

SQL>

 3)檢視10046事件跟蹤
=====================
PARSING IN CURSOR #3 len=35 dep=0 uid=0 oct=50 lid=0 tim=283911944557 hv=1972993869 ad='1d4a43dc'
explain plan for select 1 from dual
END OF STMT
PARSE #3:c=0,e=733,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=283911944554
BINDS #3:
=====================
PARSING IN CURSOR #2 len=586 dep=1 uid=0 oct=2 lid=0 tim=283911946869 hv=2508123768 ad='1d4c90b8'
insert into plan_table (statement_id, timestamp, operation, options,object_node, object_owner, object_name, object_instance, object_type,search_columns, id, parent_id, position, other,optimizer, cost, cardinality, bytes, other_tag, partition_start, partition_stop, partition_id, distribution, cpu_cost, io_cost, temp_space, access_predicates, filter_predicates, projection, time, qblock_name, object_alias, plan_id, depth, remarks, other_xml ) values(:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23,:24,:25,:26,:27,:28,:29,:30,:31,:32,:33,:34,:35,:36)

END OF STMT
PARSE #2:c=0,e=43,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=283911946867
=====================
PARSING IN CURSOR #4 len=41 dep=1 uid=0 oct=3 lid=0 tim=283911948464 hv=387538332 ad='1d4c65f0'
SELECT ORA_PLAN_ID_SEQ$.NEXTVAL FROM DUAL     -- >  plan_table[$]都會 creates the plan_id sequence number.  
END OF STMT

總結:
   utlxplan.sql 包含生成普通PLAN_TABLE表,catplan.sql包含生成PLAN_TABLE$基表和同義詞,報告說明了文章頭部說明的'PLAN_TABLE[$] creates the plan_id sequence number.'

---&gt  4 --&gt 1)若sys使用者存在plan_table,plan_table$基表的公有同義詞 也存在會優先選擇哪個表呢?

 1)檢視物件ID 
SQL>  SELECT owner,object_name,object_type,object_id  FROM DBA_OBJECTS T   WHERE T.OBJECT_NAME LIKE 'PLAN_TABLE%';

OWNER                          OBJECT_NAME                    OBJECT_TYPE          OBJECT_ID
------------------------------ ------------------------------ ------------------- ----------
SYS                            PLAN_TABLE                     TABLE                    59895
SYS                            PLAN_TABLE$                    TABLE                    59898
PUBLIC                         PLAN_TABLE                     SYNONYM                8709

SQL>
SQL> SELECT T.OWNER,T.TABLE_NAME,T.TEMPORARY FROM DBA_TABLES T WHERE T.TABLE_NAME='PLAN_TABLE$';
 
OWNER                          TABLE_NAME                     TEMPORARY
------------------------------ ------------------------------ ---------
SYS                            PLAN_TABLE$                    Y    --臨時表(session/事物級別)該表是[on commit preserve rows]session級,而不是[on commit delete rows]事物級
 
SQL>
 
 2)為準確判斷優先性,清空 sys.plan_table表資料 ---若首先選擇plan_table,plan_table普通表會記錄資料..
SQL> truncate table plan_table;

表被截斷。
 
SQL>  
 3)開啟10046 事件跟蹤檢視 
SQL>  alter session set events '10046 trace name context forever, level 12';

會話已更改。

SQL> explain plan for select 1 from dual;

已解釋。

SQL> alter session set events '10046 trace name context off';

會話已更改。

SQL> 

    跟蹤內容:
 
=====================
PARSING IN CURSOR #3 len =35 dep= 0 uid =0 oct= 50 lid=0 tim=289123971008 hv=1972993869 ad='1d4a43dc'
explain plan for select 1 from dual
END OF STMT
PARSE #3:c=0,e= 646,p=0 ,cr=0,cu= 0,mis=1 ,r=0,dep= 0,og=1 ,tim=289123971005
BINDS #3:
=====================
PARSING IN CURSOR #2 len =586 dep= 1 uid =0 oct= 2 lid=0 tim=289123972874 hv=2508123768 ad='1d4c90b8'
insert into plan_table (statement_id, timestamp, operation, options,object_node, object_owner, object_name, object_instance, object_type,search_columns, id , parent_id, position, other,optimizer, cost, cardinality , bytes, other_tag, partition_start, partition_stop, partition_id, distribution, cpu_cost, io_cost, temp_space, access_predicates, filter_predicates, projection, time , qblock_name, object_alias, plan_id, depth , remarks, other_xml ) values(:1 ,:2,: 3,:4 ,:5,: 6,:7 ,:8,: 9,:10 ,:11,: 12,:13 ,:14,: 15,:16 ,:17,: 18,:19 ,:20,: 21,:22 ,:23,: 24,:25 ,:26,: 27,:28 ,:29,: 30,:31 ,:32,: 33,:34 ,:35,: 36)
END OF STMT
PARSE #2:c=0,e= 413,p=0 ,cr=0,cu= 0,mis=1 ,r=0,dep= 1,og=4 ,tim=289123972871
=====================
PARSING IN CURSOR #4 len =41 dep= 1 uid =0 oct= 3 lid=0 tim=289123974056 hv=387538332 ad='1d4c65f0'
SELECT ORA_PLAN_ID_SEQ$.NEXTVAL FROM DUAL
END OF STMT


 4)檢視plan_table 普通表是否有資料
 E:\oracle\product\10.2.0\db_1\BIN>sqlplus.exe / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on 星期五 8月 29 17:11:48 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


連線到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> select count(1) from plan_table;

  COUNT(1)
----------
         2

已用時間:  00: 00: 00.00
SQL>  SELECT plan_table_output FROM TABLE(DBMS_XPLAN.DISPLAY('PLAN_TABLE'));   --&gt 檢視執行計劃

PLAN_TABLE_OUTPUT
-------------------------------------------------------------------------------------------------------
Plan hash value: 1388734953

-----------------------------------------------------------------
| Id  | Operation        | Name | Rows  | Cost (%CPU)| Time     |
-----------------------------------------------------------------
|   0 | SELECT STATEMENT |      |     1 |     2   (0)| 00:00:01 |
|   1 |  FAST DUAL       |      |     1 |     2   (0)| 00:00:01 |
-----------------------------------------------------------------

已選擇8行。

已用時間:  00: 00: 00.22
SQL>

總結:
   當sys使用者存在plan_table,plan_table$基表的公有同義詞也存在,優先選擇表而不是基於 基表建立的同義詞...【表 -> 同義詞】

---&gt  4 --&gt 2)若普通使用者存在plan_table,plan_table$基表的公有同義詞 也存在會優先選擇哪個表呢?.... 【結論是:優先當前使用者的plan_table,後選擇同義詞,若清楚的可以不看如下白色字型部分】

 1)檢視物件ID 和使用者ID
SQL>  SELECT owner,object_name,object_type,object_id  FROM DBA_OBJECTS T   WHERE T.OBJECT_NAME LIKE 'PLAN_TABLE%';

OWNER                          OBJECT_NAME                    OBJECT_TYPE          OBJECT_ID
------------------------------ ------------------------------ ------------------- ----------
SYS                            PLAN_TABLE                     TABLE                    59895
SYS                            PLAN_TABLE$                    TABLE                    59898
PUBLIC                         PLAN_TABLE                     SYNONYM                   8709

SQL> select * from dba_users u where username in ('SYS','TEST');

USERNAME                          USER_ID PASSWORD           ACCOUNT_STATUS    
------------------------------ ---------- ------------------------------ --------------------
TEST                                   61 7A0F2B316C212D67             OPEN                
SYS                                     0 8A8F025737A9097A               OPEN                  

SQL>
 2) 登入test使用者進行測試
SQL> conn test/test
已連線。
SQL> @?/rdbms/admin/utlxplan.sql

表已建立。

SQL>  SELECT owner,object_name,object_type,object_id  FROM DBA_OBJECTS T   WHERE T.OBJECT_NAME LIKE 'PLAN_TABLE%';

OWNER                          OBJECT_NAME                    OBJECT_TYPE          OBJECT_ID
------------------------------ ------------------------------ ------------------- ----------
SYS                            PLAN_TABLE                     TABLE                    59895
SYS                            PLAN_TABLE$                    TABLE                    59898
PUBLIC                         PLAN_TABLE                     SYNONYM                   8709
TEST                           PLAN_TABLE                     TABLE                    59901

 3) 開啟10046 事件跟蹤 檢視情況
SQL>  alter session set events '10046 trace name context forever, level 12';

會話已更改。

SQL> explain plan for select 1 from dual;

已解釋。

SQL> alter session set events '10046 trace name context off';

會話已更改。
 
SQL>
 
   跟蹤內容
 
=====================
PARSING IN CURSOR #3 len=35 dep=0 uid=61 oct=50 lid=61 tim=285666459545 hv=1972993869 ad='1d4a43dc'
explain plan for select 1 from dual
END OF STMT
PARSE #3:c=0,e=884,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=285666459542
BINDS #3:
=====================
PARSING IN CURSOR #2 len=586 dep=1 uid=61 oct=2 lid=61 tim=285666461535 hv=2508123768 ad='1d4c90b8'
insert into plan_table (statement_id, timestamp, operation, options,object_node, object_owner, object_name, object_instance, object_type,search_columns, id, parent_id, position, other,optimizer, cost, cardinality, bytes, other_tag, partition_start, partition_stop, partition_id, distribution, cpu_cost, io_cost, temp_space, access_predicates, filter_predicates, projection, time, qblock_name, object_alias, plan_id, depth, remarks, other_xml ) values(:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,:22,:23,:24,:25,:26,:27,:28,:29,:30,:31,:32,:33,:34,:35,:36)
END OF STMT
PARSE #2:c=0,e=455,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=1,tim=285666461533
=====================
PARSING IN CURSOR #4 len=41 dep=1 uid=0 oct=3 lid=0 tim=285666462709 hv=387538332 ad='1d4c65f0'
SELECT ORA_PLAN_ID_SEQ$.NEXTVAL FROM DUAL
END OF STMT
  
 檢視錶資料情況
  SQL>  select count(1) from plan_table;

  COUNT(1)
 ----------
         2

總結:

    普通使用者存在plan_table,plan_table$基表的公有同義詞,會優先選擇普通使用者存在的表.【表 -> 同義詞】

 




---&gt  5 )2個PLAN_TABLE【$】表建立路徑/指令碼詳情  

SQL> ! cat $ORACLE_HOME/rdbms/admin/catplan.sql   --&gt PLAN_TABLE$

......省略.....
create global temporary table plan_table$
(
        statement_id       varchar2(30),
        plan_id            number,
        timestamp          date,
        remarks            varchar2(4000),
        operation          varchar2(30),
        options            varchar2(255),
        object_node        varchar2(128),
        object_owner       varchar2(30),
        object_name        varchar2(30),
        object_alias       varchar2(65),
        object_instance    numeric,
        object_type        varchar2(30),
        optimizer          varchar2(255),
        search_columns     number,
        id                 numeric,
        parent_id          numeric,
        depth              numeric,        
        position           numeric,
        cost               numeric,
        cardinality        numeric,
        bytes              numeric,
        other_tag          varchar2(255),
        partition_start    varchar2(255),
        partition_stop     varchar2(255),
        partition_id       numeric,
        other              long,
        other_xml          clob,
        distribution       varchar2(30),
        cpu_cost           numeric,
        io_cost            numeric,
        temp_space         numeric,
        access_predicates  varchar2(4000),
        filter_predicates  varchar2(4000),
        projection         varchar2(4000),
        time               numeric,
        qblock_name        varchar2(30)
on commit preserve rows
/

Rem
Rem Add necessary privileges and make plan_table$ the default for 
Rem everyone
Rem
grant select, insert, update, delete on plan_table$ to public   --&gt 允許DML操作
/
create or replace public synonym plan_table for plan_table$    ---建立同義詞..生成執行計劃時後臺會找plan_table表而不是plan_table$ 
/
......省略.....

SQL> ! cat $ORACLE_HOME/rdbms/admin/utlxplan.sql    --&gt PLAN_TABLE
Rem This is the format for the table that is used by the EXPLAIN PLAN

Rem statement.  The explain statement requires the presence of this 

Rem table in order to store the descriptions of the row sources.

create table PLAN_TABLE (

        statement_id       varchar2(30),

        plan_id            number,

        timestamp          date,

        remarks            varchar2(4000),

        operation          varchar2(30),

        options            varchar2(255),

        object_node        varchar2(128),

        object_owner       varchar2(30),

        object_name        varchar2(30),

        object_alias       varchar2(65),

        object_instance    numeric,

        object_type        varchar2(30),

        optimizer          varchar2(255),

        search_columns     number,

        id                 numeric,

        parent_id          numeric,

        depth              numeric,

        position           numeric,

        cost               numeric,

        cardinality        numeric,

        bytes              numeric,

        other_tag          varchar2(255),

        partition_start    varchar2(255),

        partition_stop     varchar2(255),

        partition_id       numeric,

        other              long,

        distribution       varchar2(30),

        cpu_cost           numeric,

        io_cost            numeric,

        temp_space         numeric,

        access_predicates  varchar2(4000),

        filter_predicates  varchar2(4000),

        projection         varchar2(4000),

        time               numeric,

        qblock_name        varchar2(30),

        other_xml          clob);


  


總結:
1、【plan_table、基於PLAN_TABLE$基表建立同義詞】都可以理解是檢視執行計劃用的表,如庫中沒有該物件(或沒該物件的許可權),估算的執行計劃都是不可以用的;包括【explain plan for /SET AUTOT[RACE]...等
2、plan_table普通表提交其他會話可以看資料【session1:commit,session2可查資料】、同義詞PLAN_TABLE session級臨時表【session1:commit,session2不可檢視資料】
   具體檢視:http://blog.itpub.net/28602568/viewspace-1260334/
3、同例項同owner,一個為基於PLAN_TABLE$基表建立的同義詞、一個是PLAN_TABLE 優先於真是表.

祝好~

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8494287/viewspace-1405546/,如需轉載,請註明出處,否則將追究法律責任。

相關文章