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

NEGATIVE COLCARD CAUSES OPTIMIZER TO CHOOSE A BAD PLAN, RESULTING IN POOR
QUERY PERFORMANCE.

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
Negative COLCARD value can cause OPTIMIZER to choose a bad plan 
resulting in poor query performance. This issue can occur if all 
of the following conditions are present: 
 
1. If COLCARD exceeds 2147483647. 
 
2. Almost all possible values between high2key and low2key 
appear in the table. 
 
3. The column is BIGINT type. 
 
4. The column is not the leading column of any index. 
 
5. The column is not unique.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* NA                                                           * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to V9.7 FP10 or higher                               * 
****************************************************************
Local Fix:
Workaround for this issue is to manually update COLCARD in 
SYSSTAT.COLUMNS table. You can do this as follows: 
 
1. db2  "select count(distinct(<columnname>)) from 
<schema>.<tablename>" 
 
where: 
<columnname> is the name of the column with the negative COLCARD 
value. 
<schema> is the schema for the table. 
<tablename> is the name of the table. 
 
2. Update the value as follows: 
 
db2 "UPDATE SYSSTAT.COLUMNS SET COLCARD=<value> WHERE COLNAME = 
'<coulmnname>' AND TABNAME = '<tablename>' AND TABSCHEMA = 
'<schema>' " 
 
where: 
<value> is the result of the query from step 1.
Solution
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
19.08.2014
10.11.2014
10.11.2014
Problem solved at the following versions (IBM BugInfos)
9.7.FP10
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.10 FixList