Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Common Subquery Elimination in 8.1.7 causes incorrect results -
Hi,
There is a note on Metalink (137430.1 reproduced below) describing a generic 817 optimiser problem that will result in incorrect results when using certain query types.
We are currently running 81511 on NT but testing an upgrade to 81711 on NT at the moment.
The note suggests 2 workarounds, and my question to others is
Should we set "optimizer_features_enable = 8.1.6"
-or-
should we set "_eliminate_common_subexpr = false"
Which method does the list suggest, and what are the implications of each?
Thanks,
Bruce Reardon
mailto:bruce.reardon_at_comalco.riotinto.com.au
Doc ID: Note:137430.1
results
Type: ALERT
Status: PUBLISHED
Content Type: TEXT/PLAIN
Creation Date: 23-MAR-2001
Last Revision Date: 28-MAR-2001
Common Subquery Elimination in 8.1.7 causes incorrect results
Fixed in 8.1.7.2 and 9.0.0.0
Platforms Affected
select * from tab1
where (tab1.col1 = 1 and exists (select * from tab2)) or (tab1.col1 = 2 and exists (select * from tab3))"
There are several variations on this.
Eg:
select /*+ ALL_ROWS */ * from tab1
where (tab1.col1 = 1 and col1 in (select col1 from tab2)) or (tab1.col1 = 2 and col1 in (select col1 from tab3));
Note: The use of the two parts of the WHERE clause separated by an OR
operator,
each clause containing a non-correlated subquery.
The problem is that common subquery elimination treats un-correlated
subqueries
as identical even when they are not.
Likelihood of Occurrence
Any time the above construct is used.
This construct is common in queries used by some third party applications
including
People Soft.
This problem only occurs on database versions 8.1.7.0 and 8.1.7.1. Earlier versions are not affected.
Possible Symptoms
Workaround
Either set:
"optimizer_features_enable = 8.1.6"
-or-
"_eliminate_common_subexpr = false"
Patches
References
QUERY RETURNING ROWS IN 8.1.7 WHEN NO ROWS EXPECTED [BUG:1578644]
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Reardon, Bruce (CALBBAY) INET: Bruce.Reardon_at_comalco.riotinto.com.au Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Thu Apr 05 2001 - 22:28:25 CDT
![]() |
![]() |