DB2 - Problem description
Problem IC78187 | Status: Closed |
DB2 OPTIMIZER CAN ESTIMATE A TOO SMALL IO COST WHEN RANGE PREDICATES ARE APPLIED BY AN IXSCAN | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
When a range predicate or an equality predicate that is applied by an IXSCAN is preceded by another range predicate, DB2 optimize can estimate a too small IO cost. The problem is more likely to occur when the range predicate involves parameter marks or host variables. For example, assume we have the following index create index idx1 on t1 (c1, c2) Further assume we have predicates c1 <= ? and c1 >=? and c2 = 'a' If these predicates are applied by an IXSCAN on idx1, then the IO cost estimation of the IXSCAN can be too small. This can result in sub-optimal query plans. In db2exfmt output, one can observe the following: 1.93755e+06 IXSCAN ( 6) 19622.5 3 | 1.93755e+08 INDEX: SCHM1 IDX1 Note that the number of rows out of the IXSCAN is 1.93755e+06, but the number of IOs is only 3. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All Platforms * **************************************************************** * PROBLEM DESCRIPTION: * * DB2 OPTIMIZER CAN ESTIMATE A TOO SMALL IO COST WHEN RANGE * * PREDICATES ARE APPLIED BY AN IXSCAN * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 v9.7 Fixpack 5 or higher * **************************************************************** | |
Local Fix: | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows | |
Solution | |
First Fixed in DB2 v9.7 Fixpack 5 | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC78195 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 18.08.2011 11.06.2012 11.06.2012 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP5, 9.7.FP6 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.6 |