DB2 - Problem description
| Problem IC99051 | 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 / A50 - DB2 | |
| Problem description: | |
Optimizer profile is not saved properly if we want to exclude
one or more columns from distribution statistics.
Consider following example:
$ db2 get db cfg for sample | grep -E
'NUM_FREQVALUES|NUM_QUANTILES'
Number of frequent values retained (NUM_FREQVALUES) = 10
Number of quantiles retained (NUM_QUANTILES) = 20
$ db2 "RUNSTATS ON TABLE SYSIBM.SYSTABLES ON ALL COLUMNS WITH
DISTRIBUTION ON ALL COLUMNS AND COLUMNS (CREATOR NUM_FREQVALUES
10 NUM_QUANTILES 10, NAME NUM_FREQVALUES 0 NUM_QUANTILES 0)
DEFAULT NUM_FREQVALUES 50 NUM_QUANTILES 50 AND DETAILED INDEXES
ALL ALLOW WRITE ACCESS SET PROFILE ONLY"
$ db2 -x "SELECT CAST(STATISTICS_PROFILE AS VARCHAR(250)) FROM
SYSCAT.TABLES WHERE TABSCHEMA = 'SYSIBM' AND TABNAME =
'SYSTABLES'"
RUNSTATS ON TABLE "SYSIBM"."SYSTABLES" ON ALL COLUMNS WITH
DISTRIBUTION ON ALL COLUMNS AND COLUMNS ("CREATOR"
NUM_FREQVALUES 10 NUM_QUANTILES 10) DEFAULT NUM_FREQVALUES 50
NUM_QUANTILES 50 AND DETAILED INDEXES ALL
As we can see, non-default distribution statistics profile is
saved for custom value (10 for CREATOR), but it is not if we
want to completely exclude a given column (0 for NAME). | |
| Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Cancun Release 10.5.0.4 (also known as Fix * * Pack 4) or higher. * **************************************************************** | |
| Local Fix: | |
| available fix packs: | |
DB2 Cancun Release 10.5.0.4 (also known as Fix Pack 4) for Linux, UNIX, and Windows | |
| Solution | |
Fixed in DB2 Cancun Release 10.5.0.4 (also known as Fix Pack 4). | |
| Workaround | |
not known / see Local fix | |
| Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 29.01.2014 13.10.2014 13.10.2014 |
| Problem solved at the following versions (IBM BugInfos) | |
| Problem solved according to the fixlist(s) of the following version(s) | |
| 10.5.0.4 |
|