DB2 - Problembeschreibung
Problem IC71961 | Status: Geschlossen |
DATE PREDICATES INCORRECTLY OPTIMIZED IN QUERY REWRITE. | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problembeschreibung: | |
During query rewrite a date predicate is rewritten incorrectly. The Date arithmetic is not properly applied and the resulting optimized statement is not syntactically equivalent to the original query. For an example: Original Statement: ------------------ select f02date from datetbl where (f02date + 2 month) = '2004-02-29' Optimized Statement: ------------------- SELECT Q1.F02DATE AS "F02DATE" FROM MYSCHEMA.DATETBL AS Q1 WHERE (Q1.F02DATE = '12/29/2003') As a result the return set will not contain rows that match the predicate. | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * All * **************************************************************** * PROBLEM DESCRIPTION: * * DATE PREDICATES INCORRECTLY OPTIMIZED IN QUERY REWRITE. * **************************************************************** * RECOMMENDATION: * * Apply FP8 or use the indicated workaround * **************************************************************** | |
Local-Fix: | |
Rewriting the query by placing all constant terms on one side of the predicate might avoid the problem. | |
verfügbare FixPacks: | |
DB2 Version 9.5 Fix Pack 8 for Linux, UNIX, and Windows | |
Lösung | |
First fixed in v95 FP8 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 15.10.2010 27.06.2011 27.06.2011 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.5.FP8 | |
Problem behoben lt. FixList in der Version | |
9.5.0.8 |