Latest versionsfixlist
11.1.0.6 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
Question in the chat LiveZilla Live Help

DB2 - Problem description

Problem IC61741 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 / 950 - 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 V95FP5 and V97FP1.                                * 
****************************************************************
Local Fix:
Recommendation: upgrade to v95fp5 or v97fp1
available fix packs:
DB2 Version 9.5 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 6a for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.5 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.5 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
BUG-Tracking
forerunner  : APAR is sysrouted TO one or more of the following: IC61784 IC61793 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
26.06.2009
25.01.2010
25.01.2010
Problem solved at the following versions (IBM BugInfos)
9.5.FP5,
9.7.FP1
Problem solved according to the fixlist(s) of the following version(s)
9.5.0.5 FixList
This site uses cookies to make it easier for us to provide you with our services. By using our site you agree to the use of cookies.