A fix is available
APAR status
Closed as program error.
Error description
This APAR enhances optimizer costing here to better reflect the fact that the execution may or may not actually utilize the highly skewed value (eg. when histograms are collected) The collection of HISTOGRAM statistics on join predicates may result in the Optimizer mis-estimating the number of rows processed across a join or correlated subquery which could result in an inefficient index choice or tablespace scan being chosen on the inner table, or an inefficient join sequence. This is more likely if there exists unevenly distributed data on the join column(s) or different ranges of data between the tables which may also be the result of RUNSTATS with HISTOGRAM statistics being collected on join columns of each table at different times. Keywords: SQLJOIN
Local fix
n/a
Problem summary
**************************************************************** * USERS AFFECTED: * * All users of Db2 11 and Db2 12 for z/OS with * * a correlated subquery. * **************************************************************** * PROBLEM DESCRIPTION: * * Db2 may select an inefficient access * * path for a correlated subquery. * **************************************************************** * RECOMMENDATION: * * Apply corrective PTF when available * **************************************************************** Db2 may select an inefficient access path for a table in a correlated subquery, when data on a join column is skewed. Example: SELECT A.C1, A.C2 FROM T A WHERE A.C1 < ? AND NOT EXISTS (SELECT 1 FROM T B WHERE B.C2 = A.C2 AND B.C3 = ?); If there is an index IX1(C2) on table T, and data on C2 is skewed, Db2 may select an inefficient R-SCAN for table B instead of index IX1. The reason is that Db2 uses the histogram statistics of C2 to calculate the filter factor of the join predicate, and overestimates it. Additional Keywords: SQLACCESSPATH SQLPERFORMANCE SQLJOIN SQLSUBQUERY
Problem conclusion
Code was updated to select an efficient access path.
Temporary fix
Comments
APAR Information
APAR number
PI95063
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
B10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2018-03-14
Closed date
2018-06-14
Last modified date
2018-07-02
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI56569 UI56580
Modules/Macros
DSNXODFE
Fix information
Fixed component name
DB2 OS/390 & Z/
Fixed component ID
5740XYR00
Applicable component levels
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
02 July 2018