DB2 - Problembeschreibung
Problem IC99102 | Status: Geschlossen |
AN SQL STATEMENT JOINING A TABLE TO A VALUES CLAUSE MIGHT RESULT IN SUBOPTIMAL PERFORMANCE | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / A10 - DB2 | |
Problembeschreibung: | |
An SQL statement containing a join between a table and a VALUES clause might result in suboptimal performance under any of the following conditions: 1. The VALUES clause contains 1 set of values 2. The VALUES clause contains > 1 set of values and the SQL statement contains multiple predicates between the base table and VALUES clause The following is an example of condition 1: WITH TMP (A,B) as (VALUES (1,2)) SELECT ... FROM TMP, T1 WHERE TMP.A=T1.A AND TMP.B=T1.B The following is an example of condition 2: WITH TMP (A,B) as (VALUES (1,1),(1,2),(1,3),(1,4),(2,5),(2,6),(2,7),(2,8)) SELECT ... FROM TMP, T1 WHERE TMP.A=T1.A AND TMP.B=T1.B AND T1.A IN (SELECT A FROM TMP) AND T1.B IN (SELECT B FROM TMP) | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * All DB2 v10.1 on DB2 LUW * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 v10.1 Fix Pack 4 or above * **************************************************************** | |
Local-Fix: | |
You can avoid this problem by removing the redundant joins in the query. In the example for condition 1, since the VALUES clause contains a single set of values, you can remove the TMP table expression and replace the values in the predicates. In the example for condition 2, you can remove the redundant IN predicates, which are effectively joins between the VALUES clause and the table T1. | |
verfügbare FixPacks: | |
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows | |
Lösung | |
Fixed in DB2 v10.1 Fix Pack 4 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 31.01.2014 09.06.2014 09.06.2014 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
Problem behoben lt. FixList in der Version | |
10.1.0.4 |