DB2 - Problembeschreibung
Problem IT02856 | Status: Geschlossen |
QUERY WITH A MIX OF EQUALITY AND RANGE PREDICATES IS NOT FULLY SIMPLIFIED | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problembeschreibung: | |
Complex query is not fully simplified in situation when: - there is a check constraint on a specified column of the underlying table: ALTER TABLE CON1 ADD CONSTRAINT CON1 CHECK (COL1 <= 201212 ) ENFORCED ENABLE QUERY OPTIMIZATION; - there is a mix of equality and range predicates in the various OR sub terms on the column involved in the check constraint. Query snippet: ... (TAB1.COL1) BETWEEN 201301 AND 201309 AND TAB1.COL2 = 1 ) OR (TAB1.COL1 = 201301 AND TAB1.COL2 = 2 ) OR (TAB1.COL1 = 201309 AND TAB1.COL2 = 3 ) ... This query is not fully simplified. | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * All Users * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to fix pack 10 * **************************************************************** | |
Local-Fix: | |
Change equality predicates to range predicates Snippet: ... (TAB1.COL1) BETWEEN 201301 AND 201309 AND TAB1.COL2 = 1 ) OR (TAB1.COL1 = 201301 AND TAB1.COL2 = 2 ) OR (TAB1.COL1 = 201309 AND TAB1.COL2 = 3 ) ... can be changed to: ... (TAB1.COL1) BETWEEN 201301 AND 201309 AND TAB1.COL2 = 1 ) OR (TAB1.COL1 >= 201301 AND TAB1.COL1 < 201302 AND TAB1.COL2 = 2 ) OR (TAB1.COL1 >= 201309 AND TAB1.COL1 < 201310 AND TAB1.COL2 = 3 ) ... | |
Lösung | |
Problem fixed in fix pack 10 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 30.06.2014 05.03.2015 05.03.2015 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
Problem behoben lt. FixList in der Version | |
9.7.0.10 | |
9.7.0.11 |