What is OPAQUE_TRANSFORM Hint and how to Control it [ID 780503.1]

What is OPAQUE_TRANSFORM. Hint and how to Control it [ID 780503.1]

 修改时间 12-SEP-2010     类型 HOWTO     状态 PUBLISHED 

In this Document
  Goal
  Solution
  References


Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.3 and later   [Release: 10.2 and later ]
Information in this document applies to any platform.
Oracle Server Enterprise Edition - Version: 10.2.0.3

Goal

What is OPAQUE_TRANSFORM. usage :

The OPAQUE_TRANSFORM. hint is to help with the transformation of datatype when certain type of operations are done within the database.  For example object types .
It is also used for a insert-as-remote-select operation on a remote database 

 

Example : insert into emp (select * from emp@rep102b)   ;

call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.50          0          0          0           0
Execute      1      0.00       0.51          0          1         44          12
Fetch        0      0.00       0.00          0          0          0           0
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total        2      0.00       1.01          0          1         44          12

Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 57  (SCOTT)

Rows     Row Source Operation
-------  ---------------------------------------------------
     12  REMOTE  EMP (cr=0 pr=0 pw=0 time=508808 us)


Rows     Execution Plan
-------  ---------------------------------------------------
      0  INSERT STATEMENT   MODE: ALL_ROWS
     12   REMOTE OF 'EMP' (REMOTE) [REP102B]
             SELECT /*+ OPAQUE_TRANSFORM. */ "EMPNO","ENAME","JOB","MGR",
               "HIREDATE","SAL","COMM","DEPTNO" FROM "EMP" "EMP"


Note :  This hint should not interfere with the query optimizer plan.

Solution

The below event can be set on the client (local) in order to turn the opaque_transform. hint on and off..
- To switch on :

alter session set events '22825 trace name context off' ;

- To switch off :

1) alter session set events '22825 trace name context forever, level 1' ;

2)  or using the following hint : /*+ NO_QUERY_TRANSFORMATION */ 
3)  using  RULE hint.

 

-Note that if local site is 11g and remote is  11g server, this opens 2 sessions
   on the remote database and OPAQUE_TRANSFORM. hint gives DX LOCK deadlock.

- If  the local is 10g client and remote is 11g server, this opens 1 session on
   the remote and no DX deadlock.

References

BUG:5565178 - ORA-07445 [EVAOPN2()+220] ON SELECT WITH HINT
BUG:7417255 - /*+ OPAQUE_TRANSFORM. */ HINT BEING REWRITTEN INTO QUERY AND CAUSING SLOWNESS

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/756652/viewspace-710962/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/756652/viewspace-710962/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值