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

VERY SLOW QUERY DUE TO CORRELATED HSJN ON THE INNER OF NLJN

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
Query runs very slow due to a correlated HSJN on the inner of 
a NLJN. 
 
Example : 
 
                        0.306141 
                         NLJOIN 
                         (  16) 
                       1.03309e+07 
                        199966 
           /--------------+----------\ 
    5.9579e+07                    5.1384e-09 
      IXSCAN                        HSJOIN 
      (  17)                       (  18) 
      310054                       78.8668 
      199957                       9.04414 
        |                  /---------+----------\ 
    5.9579e+07                                  1 
     INDEX:                                  GRPBY 
  <schema.inx1>                              ( 27) 
        Q7                                 35.0439 
                                           4.02207 
                                              | 
                                          2.55873 
                                           FETCH 
                                          (  28) 
                                         35.0435 
                                        4.02207 
                                     /---+---\ 
                             2.55873       1.52447e+08 
                              IXSCAN       TABLE: 
                              (  29)      <schema.tab1> 
                               26.1437        Q9 
                                 3 
                                 | 
                          1.52447e+08 
                          INDEX: 
                          <schema.inx2> 
                              Q9 
 
Example of optimized part of SQL : 
(SELECT MIN(Q10.$C0) 
               FROM 
               (SELECT Q9.<col1> 
               FROM <schema.tab1> AS Q9 
          WHERE (Q9.<col2> = Q7.<col2>)) AS Q10) AS Q11, 
 
This is a side effect of another code fix which went in V9.1 
FP5
Problem Summary:
Users Affected : Any user using V9.1 FP5 and above 
Problem Summay : Please see the APAR description 
Problem Solution : This is an under-estimation of the 
buffer requirement which is fixed by this APAR
Local Fix:
Use optimizer guideline  similar to : 
 
<OPTGUIDELINES><NLJOIN><ACCESS TABID='Q7'/><ACCESS 
TABID='Q11'/></NLJOIN></OPTGUIDELINES>
available fix packs:
DB2 Version 9.7 Fix Pack 1 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
This APAR is fixed in V9.7 FixPak1 
(CQ defect#wsdbu00548004)
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
22.10.2009
30.12.2009
30.12.2009
Problem solved at the following versions (IBM BugInfos)
9.7.
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.1 FixList