IBM Support

IT20825: DB2 BLU QUERY CAN END UP WITH WRONG JOIN ORDER SO THAT HASH JOINIS BUILDING ON LARGE TABLE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A BLU query can be optimized with a suboptimal plan so that the
    hash join order is flipped and the hash is building on a very
    large intermediate table.
    
    This is a very specific case caused by an Effectively Cartesian
    join of the fact table in the query. This can be seen in explain
    with filter factor = 1, i.e.:
    
    		60) Predicate used in Join,
    			Comparison Operator: 		Equal (=)
    			Subquery Input Required: 	No
    			Filter Factor: 			1
    
    The query may eventually fail with SQL0955 due to out of
    SORTHEAP memory.
    A better plan which avoids this problem is picked up with
    optimization level 9. This should already happen with default
    optimization level 5.
    

Local fix

  • Use optimization level 9
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Problem Description above.                               *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 Version 11.1 Mod 3 Fix Pack 3.                *
    ****************************************************************
    

Problem conclusion

  • First fixed in Db2 Version 11.1 Mod 3 Fix Pack 3.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT20825

  • 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

    2017-06-01

  • Closed date

    2018-03-19

  • Last modified date

    2018-03-19

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

    IT16882

  • 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:
19 March 2018