home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Neueste VersionenFixList
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
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IC99527 Status: Geschlossen

THE SQL0437W MIGHT BE INDUCED BY RUNSTATS RESULTING IN INCORRECT COLCARD
VALUE

Produkt:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problembeschreibung:
The problem occurs once you execute RUNSTATS with column details 
like below: 
RUNSTATS ON TABLE DB2INST1.TESTTABLE ON ALL COLUMNS WITH 
DISTRIBUTION ON ALL COLUMNS AND DETAILED INDEXES ALL 
 
Afterwards the select statements might return warning: 
SQL0437W  Performance of this complex query might be 
sub-optimal. Reason code: "6".  SQLSTATE=01602 
 
The warning is caused by inconsistency between values in 
SYSSTAT.COLUMNS and SYSSTAT.COLDIST tables, where the COLCARD 
value of SYSSTAT.COLUMNS is the incorrect one. 
You can check the conditions by obtaining db2look with mimic 
option for the database, and comparing UPDATE statements for 
SYSSTAT.COLUMNS and SYSSTAT.COLDIST tables: 
 
1. The UPDATE for SYSSTAT.COLUMNS table sets incorrect COLCARD 
value 3: 
 
UPDATE SYSSTAT.COLUMNS 
SET COLCARD=3, 
    NUMNULLS=0, 
    SUB_COUNT=-1, 
    SUB_DELIM_LENGTH=-1, 
    AVGCOLLENCHAR=-1, 
    AVGCOLLEN=16 
WHERE COLNAME = 'C1' AND TABNAME = 'TESTTABLE' AND 
TABSCHEMA = 'DB2INST1'; 
 
 
2. The correct cardinality is stored in SYSSTAT.COLDIST table 
(note 4 different COLVALUE contents): 
 
UPDATE SYSSTAT.COLDIST 
SET COLVALUE='VAL1            ', 
    VALCOUNT=92041 
WHERE COLNAME = 'C1' AND TABNAME = 'TESTTABLE' 
      AND TABSCHEMA = 'DB2INST1' 
      AND TYPE      = 'F' 
      AND SEQNO     =  1; 
 
UPDATE SYSSTAT.COLDIST 
SET COLVALUE='VAL2            ', 
    VALCOUNT=1602 
WHERE COLNAME = 'C1' AND TABNAME = 'TESTTABLE' 
      AND TABSCHEMA = 'DB2INST1' 
      AND TYPE      = 'F' 
      AND SEQNO     =  2; 
 
UPDATE SYSSTAT.COLDIST 
SET COLVALUE='VAL3            ', 
    VALCOUNT=26 
WHERE COLNAME = 'C1' AND TABNAME = 'TESTTABLE' 
      AND TABSCHEMA = 'DB2INST1' 
      AND TYPE      = 'F' 
      AND SEQNO     =  3; 
 
UPDATE SYSSTAT.COLDIST 
SET COLVALUE='VAL4             ', 
    VALCOUNT=9 
WHERE COLNAME = 'C1' AND TABNAME = 'TESTTABLE' 
      AND TABSCHEMA = 'DB2INST1' 
      AND TYPE      = 'F' 
      AND SEQNO     =  4; 
 
 
 
The incorrect RUNSTATS results as above might occur when 
following conditions are true: 
(1) The table has compressed index, 
(2) The index has pseudo deleted keys. 
 
The problem is more likely to occur in an index where there is a 
high degree of commonality in the index keys.
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 version 9.7 fixpack 10                        * 
****************************************************************
Local-Fix:
To workaround the SQL0437W warning you might consider: 
1. Running RUNSTATS without column details. 
2. Update SYSSTAT.COLUMNS COLCARD value manually to reflect the 
number of distinct values in SYSSTAT.COLDIST table. 
3. REORG problematic table and indexes for the table to get rid 
of pseudo deleted keys, followed by a new RUNSTATS with all 
desired column options. 
 
Note that problem might reoccur again after introduction of new 
pseudo deleted keys in the index and subsequent RUNSTATS 
operation.
Lösung
Problem was first fixed in DB2 version 9.7 fixpack 10
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
20.02.2014
13.11.2014
13.11.2014
Problem behoben ab folgender Versionen (IBM BugInfos)
9.7.FP10
Problem behoben lt. FixList in der Version
9.7.0.10 FixList