DB2 - Problem description
Problem IT35183 | Status: Closed |
POOR QUERY PERFORMANCE WHEN IN SUBQUERY PREDICATE WITH NO DISTINCT. | |
product: | |
DB2 FOR LUW / DB2FORLUW / B50 - DB2 | |
Problem description: | |
Db2 query may perform slow when the following conditions are met: - There is an IN subquery predicate - No DISTINCT on the IN predicate - Many duplicate values on the subquery column(s) | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * **************************************************************** | |
Local Fix: | |
Add DISTINCT to IN subquery and use db2set DB2COMPOPT=EARLYDISTINCTSUBQ | |
Solution | |
Workaround | |
**************************************************************** * USERS AFFECTED: * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * **************************************************************** | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 07.12.2020 06.04.2021 06.04.2021 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |