OPT_PARAM Hint saves the day…
来源:互联网 发布:jackeylove知乎 编辑:程序博客网 时间:2024/06/08 08:27
一个工程师使用嵌套子查询执行删除操作,抛出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-00600errors. 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…
@Wentasy 博文仅供参考,欢迎大家来访。如有错误之处,希望批评指正。原创博文如需转载请注明出处,谢谢 :) [CSDN博客]
- OPT_PARAM Hint saves the day…
- opt_param
- saves
- Opt_param: a new optimizer hint for 10gR2
- HINT避免MERGE JOIN/*+ OPT_PARAM(\'_optimizer_mjc_enabled\',\'false/true\')
- Saves an XML document to the specified location
- The day
- c++: the hint of pointer
- Hint
- hint
- Hint
- hint
- hint
- hint
- hint
- HINT
- HINT
- Plan for the day
- jQuery json空对象筛选替换
- POJ 1035 Spell checker
- virtual ~ClxDerived()
- 查看sql语句执行时间/测试sql语句性能
- C/C++中的 error LNKxxxx: unresolved external symbol "xxxxx"
- OPT_PARAM Hint saves the day…
- 蓝桥杯(打印回形嵌套)
- 什么是函数式编程?
- oracle常用命令
- POJ 3461 Oulipo(KMP)
- fzu_2120_數字排列(狀態壓縮DP)
- hdu 3068 最长回文 (manacher算法)
- SQL 查询一列的值,显示为一个字符串。
- datawindowobject属性值