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 IC63490 Status: Geschlossen

FILTER FACTOR FOR "X = Y OR (X IS NULL AND Y IS NULL)"
EXPRESSION MAY BE UNDERESTIMATED UNDER CERTAIN CONDITIONS.

Produkt:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problembeschreibung:
In version 9.1, an expression of the form 
"x = y or (x is null and y is null)" 
is treated as an equality join predicate that evaluates NULL 
values as equal.  The DB2 SQL query optimizer will compute a 
filter factor estimate for this predicate when computing the 
optimal query access plan for a statement that includes 
this predicate.  When the appropriate statistics are collected, 
in most cases, the filter factor estimate is accurate; however, 
under certain conditions, the optimizer may underestimate the 
filter factor for this predicate which may lead to a sub-optimal 
query access plan to be chosen. 
 
This problem only applies to some scenarios where a local 
predicate is also applied on one of the columns in the join 
predicate, x or y. For example, in the query below: 
 
SELECT * FROM t1,t2 
WHERE (t1.a=t2.a OR t1.a is null AND t2.a is null) AND t2.a=?; 
 
the expressions in the WHERE clause will be written into the 
following: 
 
(Q1.A = :?) AND ((Q2.A = :?) OR (Q2.A IS NULL AND :? IS NULL )) 
 
If a constant value is used in place of the parameter marker, 
this problem does not occur.
Problem-Zusammenfassung:
In version 9.1, an expression of the form 
   "x = y or (x is null and y is null)" 
is treated as an equality join predicate that evaluates NULL 
values as equal.  The DB2 SQL query optimizer will compute a 
filter factor estimate for this predicate when computing the 
optimal query access plan for a statement that includes 
this predicate.  When the appropriate statistics are collected, 
in most cases, the filter factor estimate is accurate; however, 
under certain conditions, the optimizer may underestimate the 
filter factor for this predicate which may lead to a sub-optimal 
query access plan to be chosen. 
 
This problem only applies to some scenarios where a local 
predicate is also applied on one of the columns in the join 
predicate, x or y. For example, in the query below: 
 
SELECT * FROM t1,t2 
WHERE (t1.a=t2.a OR t1.a is null AND t2.a is null) AND t2.a=?; 
 
the expressions in the WHERE clause will be written into the 
following: 
 
(Q1.A = :?) AND ((Q2.A = :?) OR (Q2.A IS NULL AND :? IS NULL )) 
 
If a constant value is used in place of the parameter marker, 
this problem does not occur.
Local-Fix:
verfügbare FixPacks:
DB2 Version 9.7 Fix Pack 1 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Lösung
Defect   -> wsdbu00552854 
Fixed in -> Version 9.7 + FP 1 (s091114) 
Module   -> engn_sqno
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
30.09.2009
31.12.2009
31.12.2009
Problem behoben ab folgender Versionen (IBM BugInfos)
9.7.
Problem behoben lt. FixList in der Version
9.7.0.1 FixList