DB2 - Problembeschreibung
Problem IT02998 | Status: Geschlossen |
DB2 MIGHT NOT OPTIMIZE SQL QUERIES CONTAINING OUTER JOINS AND EXISTENTIAL SUBQUERIES | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problembeschreibung: | |
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); | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * All DB2 9.7 users * **************************************************************** * PROBLEM DESCRIPTION: * * See problem description above. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 9.7 Fix Pack 10 or higher. * **************************************************************** | |
Local-Fix: | |
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 | |
Lösung | |
First fixed in DB2 Version 9.7 Fix Pack 10. | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 07.07.2014 22.10.2014 22.10.2014 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.7.FP10 | |
Problem behoben lt. FixList in der Version | |
9.7.0.10 |