home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC98822 Status: Closed

RUNSTATS PROFILE DOESN'T ALLOW TO EXCLUDE COLUMNS FROM DISTRIBUT ION
STATISTICS COLLECTION (NUM_FREQVALUES OR NUM_QUANTILES = 0)

product:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problem description:
Optimizer profile is not saved properly if we want to exclude 
one or more columns from distribution statistics and this will 
create problem when 'USE PROFILE' option is given. 
 
--Num_freq and Num_quantile is 0 for column 'B' as we dont want 
distributs stats to be collected on this. 
 
$ runstats on table sahanant.tmpp on all columns with 
distribution on all columns and columns (a NUM_FREQVALUES 5 
NUM_QUANTILES 5, b NUM_FREQVALUES 0 NUM_QUANTILES 0) default 
NUM_FREQVALUES 6 NUM_QUANTILES 6 set profile only 
 
--Note: statistics_profile does not include columns 'B' in the 
runstats command 
 
$ select substr(tabname,1,10) as tabname, 
substr(statistics_profile,1,500) as statistics_profile from 
syscat.tables where tabname='TMPP' and tabschema='SAHANANT' 
 
TABNAME    STATISTICS_PROFILE 
-------------    -------------------------------- 
TMPP          RUNSTATS ON TABLE "SAHANANT"."TMPP" ON ALL COLUMNS 
WITH DISTRIBUTION ON ALL COLUMNS AND COLUMNS ("A" NUM_FREQVALUES 
5 NUM_QUANTILES 5) DEFAULT NUM_FREQVALUES 8 NUM_QUANTILES 8 
 
 
$ runstats on table sahanant.tmpp use profile; 
 
-- We have collected distribution stats on column 'B' which is 
wrong. 
select substr(colname,1,10) as colname, type, seqno, 
substr(colvalue,1,10) as colvalue, valcount from syscat.coldist 
where tabname='TMPP' and tabschema='SAHANANT' order by 
colname,type,seqno 
 
COLNAME    TYPE SEQNO  COLVALUE   VALCOUNT 
---------- ---- ------ ---------- -------------------- 
..... 
.. 
B          F         1 1                             3 
B          F         2 2                             3 
B          F         3 7                             3 
B          F         4 10                            3 
B          F         5 12                            3 
B          F         6 14                            3 
B          Q         1 1                             3 
B          Q         2 722                         715 
B          Q         3 1406                       1428 
B          Q         4 2185                       2143 
B          Q         5 2906                       2858 
B          Q         6 3620                       3573 
 
As the above example indicates, runstats has collected 
distribution stats on column 'B' whereas the intention here is 
to exclude it.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL PLATFORMS                                                * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 version 10.1 Fix Pack 4 or higher.            * 
****************************************************************
Local Fix:
Do not use statistics profile for tables where we need to 
exclude some columns from distribution statistics - use explicit 
runstats command with NUM_FREQVALUES 0 or NUM_QUANTILES 0 for 
those columns.
available fix packs:
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 6 for Linux, UNIX, and Windows

Solution
First fixed in DB2 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: IC99051 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
20.01.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 FixList