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 IC98508 Status: Closed

DB2LOOK -M GENERATES RUNSTATS COMMAND WITH WRONG "NUM_FREQVALUES-1
NUM_QUANTILES -1" OPTIONS

product:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problem description:
When use db2look mimic mode (-m) against a table which has 
distribution statistics collected on specific columns, the 
RUNSTATS command generated by db2look -m will include all 
columns in the "WITH DISTRIBUTION ON COLUMNS" clause with 
"NUM_FREQVALUES -1 NUM_QUANTILES -1" option for the columns 
which have no distribution statistics collected. 
 
Reproduce steps: 
 
-> db2 "CREATE TABLE SAMPLE.T1  ( 
                   "C1" INTEGER NOT NULL , 
                   "C2" VARCHAR(100) , 
                   "C3" VARCHAR(100) )" 
DB20000I  The SQL command completed successfully. 
 
-> db2 "insert into t1 values(1,'John','Smith'),(2, 'Tom', 
'Jones'), (3,'Jack', 'Levis')" 
DB20000I  The SQL command completed successfully. 
 
-> db2 " runstats on table sample.t1 with distribution on 
columns(c3)" 
DB20000I  The RUNSTATS command completed successfully. 
 
-> db2look -d sample -e -m -t t1 
 
In the script, the RUNSTATS command likes below: 
-- Mimic table T1 
 
RUNSTATS ON TABLE "SAMPLE"."T1" 
        WITH DISTRIBUTION ON COLUMNS ( 
                "C1" NUM_FREQVALUES -1 NUM_QUANTILES -1, 
                "C2" NUM_FREQVALUES -1 NUM_QUANTILES -1, 
                "C3" NUM_FREQVALUES 3 NUM_QUANTILES 3);
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to db2 Version 10.1 FixPack 4                        * 
****************************************************************
Local Fix:
Before execute the script, manually remove those columns from 
"WITH DISTRIBUTION ON 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
Problem was first fixed in Version 10.1 FixPack 4
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
27.12.2013
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