home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Neueste VersionenFixList
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IT02857 Status: Geschlossen

QUERY WITH A MIX OF EQUALITY AND RANGE PREDICATES IS NOT FULLY SIMPLIFIED

Produkt:
DB2 FOR LUW / DB2FORLUW / A10 - 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                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 10.1 Fix Pack 5                               * 
****************************************************************
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
First fixed in DB2 10.1 Fix Pack 5
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
30.06.2014
17.02.2017
17.02.2017
Problem behoben ab folgender Versionen (IBM BugInfos)
Problem behoben lt. FixList in der Version
10.1.0.5 FixList