IBM Support

IC78187: DB2 OPTIMIZER CAN ESTIMATE A TOO SMALL IO COST WHEN RANGE PREDICATES ARE APPLIED BY AN IXSCAN

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When a range predicate or an equality predicate that is applied
    by an IXSCAN is preceded by another range predicate, DB2
    optimize can estimate a too small IO cost. The problem is more
    likely to occur when the range predicate involves parameter
    marks or host variables.
    
    For example, assume we have the following index
    
    create index idx1 on t1 (c1, c2)
    
    Further assume we have predicates
    
    c1 <= ? and
    c1 >=? and
    c2 = 'a'
    
    If these predicates are applied by an IXSCAN on idx1, then the
    IO cost estimation of the IXSCAN can be too small. This can
    result in sub-optimal query plans.
    
    In db2exfmt output, one can observe the following:
    
    
        1.93755e+06
          IXSCAN
          (   6)
          19622.5
             3
            |
        1.93755e+08
      INDEX: SCHM1
         IDX1
    
    Note that the number of rows out of the IXSCAN is 1.93755e+06,
    but the number of IOs is only 3.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All Platforms                                                *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * DB2 OPTIMIZER CAN ESTIMATE A TOO SMALL IO COST WHEN RANGE    *
    * PREDICATES ARE APPLIED BY AN IXSCAN                          *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 v9.7 Fixpack 5 or higher                      *
    ****************************************************************
    

Problem conclusion

  • First Fixed in DB2 v9.7 Fixpack 5
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC78187

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-08-18

  • Closed date

    2012-06-11

  • Last modified date

    2012-06-11

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IC78195

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
11 June 2012