IBM Support

IT28286: POSSIBLE PERFORMACE REGRESSION FOR SELECT DISTINCT SUB-QUERY WHEN MIGRATING TO DB2 V11.1.3

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • If a query contains a sub-query with SELECT DISTINCT together
    with other complex operations such as OUTER JOIN and UNION ALL,
    the query performance might be regressed.
    
    Example query:
    
    SELECT t3.c4
    FROM (SELECT t1.c2 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1)
    AS v1(c2), t3
    WHERE v1.c2 = t3.c1 AND t3.c3 IN (SELECT DISTINCT c3 FROM t3
    WHERE c2 = 100)
    
    In v11.1.3, the SELECT DISTINCT sub-query is merged into the
    outer query block and DISTINCT is executed as part of the outer
    SELECT clause.
    
    Prior to V11.1.3, the sub-query is not merged and DISTINCT is
    executed as part of the sub-query.
    

Local fix

  • Workaround: Apply the following registry setting using the
    optimization guideline to the affected queries:
    
    /* <OPTGUIDELINES>
       <REGISTRY>
            <OPTION NAME='DB2COMPOPT' VALUE='NO_EXTDEEPKEYPU'/>
       </REGISTRY>
    </OPTGUIDELINES> */
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 11.1 Mod 4 Fixpack 5 or higher                *
    ****************************************************************
    

Problem conclusion

  • First fixed in Db2 11.1 Mod 4 Fixpack 5
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT28286

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-03-04

  • Closed date

    2020-01-16

  • Last modified date

    2020-01-16

  • 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

  • RB10 PSN

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 January 2020