IBM Support

IC73249: Joining to a VALUES clause may result in suboptimal plans.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Using a JOIN between a VALUES clause and a table or sub-select
    might result in suboptimal query plans. If the VALUES clause
    contains multiple columns, the optimizer might not choose the
    best join method for satisfying the JOIN if the VALUES clause
    joins to multiple tables with a common local equality predicate
    as in the following example:
    
    
    SELECT ... FROM table(values(?,?),(?,?),(?,?),(?,?)) as a(a1,
    a2), b, c, d WHERE a.a1=b.b1 and a.a2=b.b2 and a.a1=c.c1 and
    a.a2=c.c2 and  a.a1=d.d1 and a.a2=d.d2 and a.a3 = ? and
    b.b3=a.a3 and c.c3=a.a3
    

Local fix

  • Use an IN predicate instead of a JOIN to a VALUES clause
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All DB2 users                                                *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * Using a JOIN between a VALUES clause and a table or          *
    * sub-select  might result in suboptimal query plans.          *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 9.7 Fix pack 5 or later                       *
    ****************************************************************
    

Problem conclusion

  • Upgrade to a Fix Pack containing the Fix
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC73249

  • 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

    2010-12-13

  • Closed date

    2011-12-19

  • Last modified date

    2011-12-19

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

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

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:
19 December 2011