OPT_PARAM Hint saves the day…

159 篇文章 113 订阅
86 篇文章 1 订阅

一个工程师使用嵌套子查询执行删除操作,抛出ORA-00600错误。在MOS查阅工具上显示这个错误是由此Bug引起的:

 

Bug 16347248  ORA-600 [kkqjpdGetContext:1] parsing SQL with subquery

 

这个Bug提供的解决办法是执行ALTER SESSION命令。

 

alter session set "_optimizer_unnest_disjunctive_subq"= FALSE;


 

相比改变全局会话,我们使用OPT_PARAMHint,编写像下述的子查询:

 

(SELECT /*+ OPT_PARAM('_optimizer_unnest_disjunctive_subq' 'FALSE') */ ... FROM ...)


 

发表评论提醒我们在11.2.0.4或者12c上删除Hint,工作愉快。

 

加油。

 

One of the developers was performing a delete using a nested subquery, which was throwing outORA-00600 errors. The ORA-00600 LookupTool on MOS suggested it was caused by this bug:
Bug 14347248 ORA-600 [kkqjpdGetContext:1] parsing SQL with subquery
The workaround in the bug suggested running this ALTER SESSION command.
alter session set "_optimizer_unnest_disjunctive_subq"= FALSE;
Rather than alter the whole session, we used the OPT_PARAM hint, making the subquery look something like this.(SELECT /*+ OPT_PARAM('_optimizer_unnest_disjunctive_subq' 'FALSE') */ ... FROM ...)
Slap in a comment reminding us to remove the hint when we move to 11.2.0.4 or 12c and job’s a good’un!
Cheers
Tim…

OPT_PARAM Hint saves the day…

 

 

katoonSina   CSDN
@Wentasy 博文仅供参考,欢迎大家来访。如有错误之处,希望批评指正。原创博文如需转载请注明出处,谢谢 :) [CSDN博客]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值