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 IC98771 Status: Geschlossen

DB2 OPTIMIZER MAY USE FREQUENCY VALCOUNT IN SYSSTAT.COLDIST INCORRECTLY AND
GIVE SUB-OPTIMIAL ACCESS PLAN.

Produkt:
DB2 FOR LUW / DB2FORLUW / A50 - DB2
Problembeschreibung:
Under rare circumstances, DB2 optimizer may use frequency 
VALCOUNT of a COLVALUE that doesn't match with the value in a 
query. The problem happens on CHAR or VARCHAR data type columns 
only. 
 
For example, 
 
1. In TAB1, value "0A00000005" appears in 1000 rows, and others 
values appear in 1 row only. 
 
db2 "select count(*),c1 from tab1 group by c1" 
 
1           C1 
----------- ---------- 
          1 0000000009 
          1 0A00000000 
       1000 0A00000005 
          1 0A00000019 
          1 0A00000123 
          1 0A99900999 
          1 0B99990099 
 
2. SYSSTAT.COLDIST has valid data, and frequency VALCOUNT of 
"0A00000005" is 1000. 
 
select substr(colvalue, 1, 30) colvalue, valcount 
from sysstat.coldist 
where colname = 'C1' and tabname ='TAB1' and 
tabschema = '<SCHEMA>' and TYPE = 'F' 
 
COLVALUE                       VALCOUNT 
------------------------------ -------------------- 
'0A00000005'                                   1000 
-                                                -1 
-                                                -1 
-                                                -1 
-                                                -1 
 
3. For the following query, optimizer incorrectly uses frequency 
VALCOUNT of "0A00000005" for "c1='0A00000019'" predicate and 
estimate 1000 returned rows. 
 
select * from tab1 where c1='0A00000019'; 
 
      Rows 
     RETURN 
     (   1) 
      Cost 
       I/O 
       | 
      1000 
     DTQ 
     (   2) 
    0.850451 
        0 
       | 
      1000 
     IXSCAN 
     (   3) 
    0.502298 
        0 
       | 
      1006 
 INDEX: SHULIN 
    TAB1_IDX1 
       Q1
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All Users                                                    * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 V105FP4 or higher version.                    * 
****************************************************************
Local-Fix:
statistical views can be used to work around the issue.
verfügbare FixPacks:
DB2 Cancun Release 10.5.0.4 (also known as Fix Pack 4) for Linux, UNIX, and Windows
DB2 Version 10.5 Fix Pack 9 for Linux, UNIX, and Windows

Lösung
Fixed on DB2 V105FP4
Workaround
statistical views can be used to work around the issue.
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
16.01.2014
15.09.2014
15.09.2014
Problem behoben ab folgender Versionen (IBM BugInfos)
Problem behoben lt. FixList in der Version
10.5.0.4 FixList