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

RUNSTATS "FOR INDEXES" CLAUSE RESETS EXISTING RANGE PARTITION
TABLE STATISTICS

product:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problem description:
If runstats is executed on a range partitioned table using the 
"FOR INDEXES" clause, existing partition statistics in 
syscat.datapartitions will be reset to 0. 
 
For example, executing runstats for only 1 index can be done as 
follows : 
 
runstats on table db2inst1.tab1 for detailed index db2inst1.idx1 
 
and the data partition statistics can be retrieved as follows : 
 
select substr(tabname,1,20) as 
tabname,card,npages,fpages,stats_time 
from syscat.datapartitions 
where tabname = 'TAB1' 
 
With this apar, the statistics will show 0 for columns card, 
npages and fpages. 
 
More examples of runstats executions that will have this problem 
: 
runstats on table db2inst1.tab1 for index db2inst1.idx1; 
runstats on table db2inst1.tab1 for detailed indexes all; 
...
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* all                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade the DB2 server to DB2 v10 Fix Pack 1                 * 
****************************************************************
Local Fix:
Use the "AND INDEXES" clause, which will collect table 
statistics as well as index statistics. 
e.g. to correct example 1 : 
 
 
runstats on table db2inst1.tab1 AND detailed index 
db2inst1.idx1; 
 
Note this this will slow down runstats execution as table 
statistics are also gathered.
available fix packs:
DB2 Version 10.1 Fix Pack 1 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 6 for Linux, UNIX, and Windows

Solution
This problem has first been fixed in DB2 V10 Fix Pack 1
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
14.06.2012
29.11.2012
29.11.2012
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
10.1.0.1 FixList
10.5.0.1 FixList