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 | |
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 |