APAR status
Closed as program error.
Error description
The user has a partitioned table with at least a Data Secondary Partitioned index (DPSI). The first two columns of the partitioned index have the following cardinality: COL1=1 COL2=5 So the combination of the distinct values of thetwo columns should be 5. However after a RUNSTATS , SYSIBM.SYSCOLDIST contains the following: ! COLGROUPCOLNO !CARDF! NUMCOLUMNS ------------------------------------------------ ! 00010002 ! 8 ! 2 ! 000100020003 ! 3 ! 3 ! 0001000200030004 ! 5 ! 4 CARDF of Colgroup 1,2 is 8 and obviously wrong. Effectively the CARDF of Colgroup 1,2 seems to be the sum of the CARDF of the other colgroups.
Local fix
BYPASS/CIRCUMVENTION: Define an NPI as the first index on the table and define the DPSI index after that. In this scenario the cardinality stats is reported correctly for the DPSI index.
Problem summary
**************************************************************** * USERS AFFECTED: * * All Db2 12 for z/OS utility users of * * RUNSTATS or inline STATISTICS * * gathering statistics on a multi-column * * partitioned index that is not a DPSI. * **************************************************************** * PROBLEM DESCRIPTION: * * INCORROUT MSGDSNU616I intermediate * * keycard statistics during * * RUNSTATS INDEX on multi-column * * partitioned indexes resulting in * * incorrect CARDF in SYSIBM.SYSCOLDIST * **************************************************************** * RECOMMENDATION: * * Apply corrective PTF when available * **************************************************************** When the user executed RUNSTATS INDEX on a partitioned index with more than two key columns, the statistics reported incorrect intermediate correlation values in DSNU616I and the SYSIBM.SYSCOLDIST catalog table was updated with those values. The leading key columns had the same column value appearing across adjacent partitions. This resulted in wrong aggregation of the intermediate key cardinalities across partitions. This problem can also occur during REORG, LOAD, REBUILD INDEX utilities with inline STATISTICS index processing.
Problem conclusion
The code was modified to take into consideration the same intermediate key values spanning across partitions and arrive at the correct cardinality values for each set of columns. With this APAR, the intermediate key cardinalities are now calculated using a Hash algorithm. The intermediate key cardinalities will be accurate when the number of distinct values are lower than 100. For indexes with high number of distinct values at the intermediate level, the derived cardinalities will be only an estimate. With this APAR, since hash structures are now used for arriving at the intermediate cardinality, the user may receive MSGDSNU623I during aggregation, when executing the utility at the partition level. DSNU623I can be avoided by specifying FORCEROLLUP keyword when executing the utility at the partition level.
Temporary fix
Comments
APAR Information
APAR number
PH45533
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
C10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2022-04-07
Closed date
2022-05-20
Last modified date
2022-06-01
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI80643
Modules/Macros
DSNUSIDX DSNUSIIX DSNUSEOF
Fix information
Fixed component name
DB2 OS/390 & Z/
Fixed component ID
5740XYR00
Applicable component levels
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"DB2 for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.0","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Document Information
Modified date:
06 July 2022