home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
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
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC61784 Status: Closed

OPTIMIZER MIGHT OVERESTIMATE THE SELECTIVITY OF A RANGE PREDICATE
WHICH XML INDEX IS CREATED AS TIMESTAMP DATA TYPE

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
Problem Description: Optimizer might overestimate the 
selectivity of a range predicate when the range predicate is 
based on an XML index defined as TIMESTAMP data type. Optimizer 
might choose this TIMESTAMP data type XML index and it could 
lead to inefficient plan. 
 
For example, the following query has range predicate on the 
TIMESTAMP data type XML index issueIndex.  Optimizer might 
overestimate selectivity of the range predicate. 
 
create table T(id int, xmldata XML); 
create index issueIndex on T(xmldata) 
  generate key using xmlpattern '/test/account/issueDate' as 
SQLTIMESTAMP; 
 
   SELECT X.col 
   from T, 
 xmltable(' 
     for $i in 
 
$doc/test/account[issueDate[.<=xs:dateTime("2008-12-31T00:00:00 
") 
 and .>=xs:dateTime("2008-01-01T00:00:00")]] 
   return $i' 
   passing T."XMLDATA" as "doc" 
   columns col TimeStamp path 'issueDate') X; 
 
 Local fix: No. Recommendation: upgrade to v95fp5 or v97fp1
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* Users who issue XQuery or SQL/XML query containing the range * 
* predicate based on an XML index defined as TIMESTAMP data    * 
* type.                                                        * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* Optimizer might overestimate the selectivity of a range      * 
* predicate when the range predicate is  based on an XML index * 
* defined as TIMESTAMP data type. Optimizer might choose this  * 
* TIMESTAMP data type XML index and it could lead to           * 
* inefficient plan.                                            * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to V97FP1.                                           * 
****************************************************************
Local Fix:
Recommendation: upgrade to v95fp5 or v97fp1
available fix packs:
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

Solution
The XML index defined as TIMESTAMP data type will be evaluated 
as access plan candidate.
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
29.06.2009
25.01.2010
25.01.2010
Problem solved at the following versions (IBM BugInfos)
9.7.FP1
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.1 FixList