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 IC80537 Status: Closed

XQUERY WHICH CONTAINS XPATH EXTRACTION IN A FOR ... LET STATEMENT HAS A BAD
PERFORMANCE

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
The performance of an XQUERY which contains path extraction in a 
'for loop' statement, such as 'for ... let' and 'for ...', 
has a bad performance in V97 compared to V91.  While the 
performance is bad in general, some queries may show worse 
performance than the others, depending on the amount of data to 
be extracted. The problem is caused by a bad plan being chosen 
by the optimizer. 
 
An example of such query is: 
----- 
xquery declare namespace xxxx="http://xxxx"; let $base := 
db2-fn:xmlcolumn("xxxx")/ap:LimitData for $name in 
fn:distinct-values( $base[./xxxx:ScheduleDate < 
xs:string(fn:current-date())]/xxxx:ChargeList/xxxx:Charge/xxxx:U 
serSectionName ), $count in fn:count( $base[./xxxx:ScheduleDate 
< xs:string(fn:current-date()) and 
./xxxx:ChargeList/xxxx:Charge/xxxx:UserSectionName=$name] ) 
order by $name return <xxxx:LDOutline> <xxxx:Name>{ $name 
}</xxxx:Name> <xxxx:Count>{ $count } </xxxx:Count> 
</xxxx:LDOutline>@ 
----- 
 
Another example of such query is : 
----- 
xquery declare namespace xxxx="http://xxxx"; let $base := 
db2-fn:xmlcolumn("xxxx")/xxxx:LimitData for $name in 
fn:distinct-values( $base[./xxxx:ScheduleDate < 
xs:string(fn:current-date())]/xxxx:ChargeList/xxxx:Charge/xxxx:U 
serSectionName ) 
order by $name return <xxxx:LDOutline> <xxxx:Name>{ $name } 
</xxxx:Name> <xxxx:Count> { fn:count( $base[./xxxx:ScheduleDate 
< xs:string(fn:current-date()) and ./xxxx:ChargeList/xxxx: 
Charge/xxxx:UserSectionName=$name] ) } 
</xxxx:Count> </xxxx:LDOutline> ; 
-----
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* DB2 UDB Version 9.7.                                         * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error description field for more information.            * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to Version 9.7 FixPack 6.                            * 
****************************************************************
Local Fix:
available fix packs:
DB2 Version 9.7 Fix Pack 7 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 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
Problem was first fixed in DB2 UDB Version 9.7 FixPack 6. 
Upgrade to Version 9.7 FixPack 6.
Workaround
not known / see Local fix
BUG-Tracking
forerunner  : APAR is sysrouted TO one or more of the following: IC80587 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
21.12.2011
20.10.2012
20.10.2012
Problem solved at the following versions (IBM BugInfos)
9.7.FP6
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.7 FixList