DB2 - Problembeschreibung
Problem IC77340 | Status: Geschlossen |
INCORRECT OUTPUT MIGHT BE RETURNED BY A QUERY WITH PARTITION ELIMINATION INVOLVING MULTIPLE COLUMNS AND NON-CONSTANT KEYS | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problembeschreibung: | |
You might encounter incorrect output from a SQL statement that references a partitioned table with a multi-column range key, and satisfies all the following conditions: 1. The WHERE clause contains a partition elimination eligible predicate, p1, with place holder variable, such as COL1=? 2. The WHERE clause contains a correlated subquery or a join, p2, that is partition elimination eligible. 3. The predicate p1 is applied on a leading column in the range key, followed by the predicate p2. For example, consider a table T1 partitioned by range on (COL1,COL2). If an SQL statement contains a WHERE clause as SELECT ... FROM ..., T1, T2, ... WHERE ... T1.COL1 = ? AND T1.COL2 = T2.X ... then, you might encounter incorrect output. Likewise, incorrect output is also possible if the predicates are within a correlated subquery such as WHERE T2.Y = (SELECT MAX(T1.Y) FROM T1 WHERE T1.COL1 = ? AND T1.COL2 = T2.Y) If the predicates on COL1 and COL2 are switched, you will get the correct output. | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * You might encounter incorrect output from a SQL statement * * that references a partitioned table with a multi-column * * range key, and satisfies all the following conditions: * * * * 1. The WHERE clause contains a partition elimination * * eligible predicate, p1, with place holder variable, such as * * COL1=? * * 2. The WHERE clause contains a correlated subquery or a * * join, p2, that is partition elimination eligible. * * 3. The predicate p1 is applied on a leading column in the * * range key, followed by the predicate p2. * * * * For example, consider a table T1 partitioned by range on * * (COL1,COL2). If an SQL statement contains a WHERE clause as * * * * SELECT ... * * FROM ..., T1, T2, ... * * WHERE ... T1.COL1 = ? AND T1.COL2 = T2.X ... * * * * then, you might encounter incorrect output. Likewise, * * incorrect output is also possible if the predicates are * * within a correlated subquery such as * * * * WHERE T2.Y = (SELECT MAX(T1.Y) FROM T1 WHERE T1.COL1 = ? AND * * T1.COL2 = T2.Y) * * * * If the predicates on COL1 and COL2 are switched, you will * * get the correct output. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 9.5 Fix Pack 9 * **************************************************************** | |
Local-Fix: | |
Replace the place holder variable with a constant or use the REOPT option. | |
verfügbare FixPacks: | |
DB2 Version 9.5 Fix Pack 9 for Linux, UNIX, and Windows | |
Lösung | |
Problem was first fixed in Version 9.5 Fix Pack 9 | |
Workaround | |
See LOCAL FIX | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 05.07.2011 07.03.2012 07.03.2012 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.5.FP9 | |
Problem behoben lt. FixList in der Version | |
9.5.0.9 |