DB2 - Problem description
Problem IC99125 | Status: Closed |
IMPROVE QUERY PERFORMANCE WHEN QUERY CONTAINS CARTESIAN JOIN OVER SELECT DISTINCT FROM ALIAS | |
product: | |
DB2 FOR LUW / DB2FORLUW / A10 - DB2 | |
Problem description: | |
A select distinct subquery may be consolidated to the outer query block by db2 compiler in sought of better join planning for the outer query block, although that postpones the duplicated rows removal of the subquery. But if the select distinct subquery result participates in no join predicate of the outer query block, i.e. this outer query has cartesian join, preserving select distinct to remove duplication before performing the cartesian join is a better plan. This heuristic used to be available to subquery "select distinct from base_table" and is now extended to subquery "select distinct from alias" | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 10.1 Fix Pack 4 * **************************************************************** | |
Local Fix: | |
Manually rewrite "select distinct col1, col2, ..., colN from alias" to "select col1, col2, ..., colN from alias group by col1, col2, ..., colN". | |
available fix packs: | |
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows | |
Solution | |
First fixed in Version 10.1 Fix Pack 4 | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC99234 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 03.02.2014 02.06.2014 02.06.2014 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.1.0.4 |