home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IT03070 Status: Closed

DB2 MIGHT NOT OPTIMIZE SQL QUERIES CONTAINING OUTER JOINS AND EXISTENTIAL
SUBQUERIES

product:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problem description:
DB2 might not be able to fully optimize queries containing the 
following pattern leading to long execution times. 
Pattern conditions: 
1) The query contains one or more outer joins. 
2) The null producing side of the outer join is involved in a 
correlated predicate inside a subquery 
3) The subquery is of the form EXISTS or IN. 
4) The subquery is used in the context of a predicate with no 
complex expressions like OR, CASE, etc. 
 
eg. 
select * from t1 left join t2 on t1.c1 = t2.c1 where exists 
(select * from t3 where t2.c2 = t3.c2); 
select * from t1 left join t2 on t1.c1 = t2.c1 where t2.c2 in 
(select c2 from t3); 
 
 Workaround: 
Rewrite the query to convert the subquery into a DISTINCT inner 
join 
select * from t1 left join t2 on t1.c1 = t2.c1 inner join 
(select distinct c2 from t3) on t2.c2 = t3.c2
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Problem Description above.                               * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 Version 10.1 Fix Pack 5.                      * 
****************************************************************
Local Fix:
Solution
First fixed in Version 10.1 Fix Pack 5.
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
10.07.2014
14.07.2015
14.07.2015
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
10.1.0.5 FixList