IBM Support

IC71507: ENHANCE QUERY PERFORMANCE THROUGH PUSHDOWN OF ANTI-JOIN(S) THROUGH UNION ALL VIEW(S)

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • DB2 Query ReWrite may be able to improve the performance of a
    query by optimizing it during compilation if it satisfies the
    following conditions:
    - The query refers to 2 or more UNION ALL views (UAV)
    - Each UAV branch or operand is one of the following:
    (a) a select over a base table
    (b) an anti-join between 2 base tables (using a not-exists
    subquery)
    (c) an inner, left or right outer join of any combination of (a)
    or (b)
    (d) an inner, left or right outer join of any combination of
    (a), (b) or (c)
    - The UAVs are joined to each other
    - The joins between the UAVs are either all inner joins or joins
    on columns that source from row-preserving sides of any outer
    joins
    
    This enhancement is only available under registry variable
    control. To enable it, issue:
    db2set
    DB2_UNION_OPTIMIZATION=[<other-values>,]
    ENABLE_NESQ_PD_THRU_UA=YES
    [,<other-values>]
    
    and restart the database manager for settings to take effect.
    

Local fix

  • Manually rewrite any applicable queries to be of the form
    derived through this enhancement.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * DB2 Query ReWrite may be able to improve the performance of  *
    * a                                                            *
    * query by optimizing it during compilation if it satisfies    *
    * the                                                          *
    * following conditions:                                        *
    *                                                              *
    * - The query refers to 2 or more UNION ALL views (UAV)        *
    *                                                              *
    * - Each UAV branch or operand is one of the following:        *
    *                                                              *
    * (a) a select over a base table                               *
    *                                                              *
    * (b) an anti-join between 2 base tables (using a not-exists   *
    *                                                              *
    * subquery)                                                    *
    *                                                              *
    * (c) an inner, left or right outer join of any combination of *
    * (a)                                                          *
    * or (b)                                                       *
    *                                                              *
    * (d) an inner, left or right outer join of any combination of *
    *                                                              *
    * (a), (b) or (c)                                              *
    *                                                              *
    * - The UAVs are joined to each other                          *
    *                                                              *
    * - The joins between the UAVs are either all inner joins or   *
    * joins                                                        *
    * on columns that source from row-preserving sides of any      *
    * outer                                                        *
    * joins                                                        *
    *                                                              *
    *                                                              *
    *                                                              *
    * This enhancement is only available under registry variable   *
    *                                                              *
    * control. To enable it, issue:                                *
    *                                                              *
    * db2set                                                       *
    *                                                              *
    * DB2_UNION_OPTIMIZATION=[<other-values>,]ENABLE_NESQ_PD_THRU_ *
    * UA                                                           *
    * ES[,<other-values>]                                          *
    *                                                              *
    *                                                              *
    *                                                              *
    * and restart the database manager for settings to take        *
    * effect.                                                      *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 Version 9.5 Fix Pack 8 or later.              *
    ****************************************************************
    

Problem conclusion

  • First addressed in DB2 Version 9.5 Fix Pack 8.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC71507

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    950

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-09-27

  • Closed date

    2012-01-31

  • Last modified date

    2012-01-31

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

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

    IC76000

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R950 PSN

       UP

  • R950 PSY

       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.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
31 January 2012