set line2222 pages1000 col name for a40 col valuefor a10 col describ for a60 select x.ksppinm name, y.ksppstvl value, x.ksppdesc describ from sys.x$ksppi x, sys.x$ksppcv y where x.inst_id = userenv ('instance') and y.inst_id = userenv ('instance') and x.indx = y.indx and x.ksppinm ='_nlj_batching_enabled';
NAME VALUE DESCRIB ---------------------------------------- ---------- ------------------------------------------------------------ _nlj_batching_enabled 0 enable batching of the RHS IO in NLJ
确实值被设置为 0,与该 BUG 现象完全一致,根据 MOS 建议有两种解决方案:
这个问题 Oracle 官方提供了两种解决方案:
打补丁 26153372(需要停机)
修改隐含参数 _nlj_batching_enabled=1(在线修改)
如果停机时间充足的情况下,还是比较建议打补丁。
问题解决
打补丁修复,首先检查 OPatch 是否符合要求:
1 2 3 4 5 6
[oracle@lucifer ~]$ cd$ORACLE_HOME [oracle@lucifer dbhome_1]$ cd OPatch/ [oracle@lucifer OPatch]$ ./opatch version OPatch Version: 12.1.0.1.3
OPatch succeeded.
补丁 README 需要 opatch 版本为:12.1.0.1.4 or the latest version,这里 12.1.0.2 版本下载 12CR2 版本的 OPatch 即可:
[oracle@lucifer ~]$ cd 26153372/ [oracle@lucifer 26153372]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./ Oracle Interim Patch Installer version 12.2.0.1.45 Copyright (c) 2025, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/12.1.0.2/dbhome_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/12.1.0.2/dbhome_1/oraInst.loc OPatch version : 12.2.0.1.45 OUI version : 12.1.0.2.0 Log file location : /u01/app/oracle/product/12.1.0.2/dbhome_1/cfgtoollogs/opatch/opatch2025-03-26_15-12-18PM_1.log