DB2 - Problem description
Problem IT01794 | Status: Closed |
QUERIES CONTAINING COMPLEX OR PREDICATE WITH THE SAME COLUMN REFERENCED IN MULTIPLE SUBTERMS MAY EXPERIENCE POOR PERFORMANCE | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem description: | |
Queries that contain complex OR predicates may experience poor cardinality estimation and a poorly performing access plan may be generated. The OR predicate must - reference multiple columns - each subterm of the OR contains references to some of the same columns - for a given column the predicate in each OR subterm is different For example ((ca_country = 'United States' and ca_state in ('KY', 'GA', 'NM') and ss_net_profit between 100 and 200) or (ca_country = 'United States' and ca_state in ('MT', 'OR', 'MT') and ss_net_profit between 150 and 300) or (ca_country = 'United States' and ca_state in ('IN', 'WI', 'MO') and ss_net_profit between 50 and 250)) Each subterm of the OR predicate contains a reference to ca_country, ca_state and ss_net_profit. For the columns ca_state and ss_net_profit, the actual predicate referencing these columns is different in each branch. Such an OR predicate may be susceptible to incorrect filter factor estimation, using the db2exfmt output you may see predicates with the SELECTIVITY 1.0 attribute. (Q5.SS_SALES_PRICE >= +50.00 SELECTIVITY 1.000000) AND (Q5.SS_SALES_PRICE <= +300.00 SELECTIVITY 1.000000) Using some test queries you should validate whether the cardinality of lower operators in the plan is accurate. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 LUW version 10.5 fixpak 4. * **************************************************************** | |
Local Fix: | |
available fix packs: | |
DB2 Cancun Release 10.5.0.4 (also known as Fix Pack 4) for Linux, UNIX, and Windows | |
Solution | |
First fixed in DB2 LUW version 10.5 fixpak 4. | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 14.05.2014 08.09.2014 08.09.2014 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.5.0.4 |