IBM Support

IT32754: SUSTAINABLE TRAP DUE TO QUERY RE-WRITE WITH MQTS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Sustainable trap in DB2 optimizer during query re-write for MQT
    
    Trap file will show:
    
    Signal #11
    <IsTrapSustainable> Yes </IsTrapSustainable>
    
    sqlnq_opr21opr_non_deterministicEv + 0x0001
    sqlnq_opr21get_non_deterministicEv + 0x0006
    sqlnq_opr8is_etnteEv + 0x000f
    address: 0x00007FF2B21FB99B ; dladdress: 0x00007FF2AB272000 ;
    offset in lib: 0x0000000006F8999B ;
    sqlnr_subqppd_actionP10sqlnr_qrwaPiP14sqlnr_progress + 0x0281
    sqlnr_compPiiP16sqlnr_rule_stateP10sqlnr_qrwaP14sqlnr_progress
    sqlnr_seqPiP10sqlnr_qrwaP14sqlnr_progressP12sqlnr_rclass
    sqlnr_rcciP10sqlnr_qrwaPiP14sqlnr_progress
    sqlnr_magic_detail_actionP10sqlnr_qrwaPiP14sqlnr_progress
    sqlnr_compPiiP16sqlnr_rule_stateP10sqlnr_qrwaP14sqlnr_progress
    
    
    May cause side effect in which other applications have
    Application Status = Compiling which can only be cleared by
    restarting DB2 instance.
    

Local fix

  • Avoid using MQTs, but if this is not possible, use one of three
    different workarounds available:
    
    A) db2set -im DB2_UNION_OPTIMIZATION='MAX_JOINS_IN_UNION 3'
    Disadvantage: Affects all SQL queries on system.
    
    B)Append optimizer guideline to end of SQL statement:
    
    /* <OPTGUIDELINES>
    <REOPT VALUE='ALWAYS'/>
    <QRYOPT VALUE='1'/>
    </OPTGUIDELINES> */ ;
    
    Disadvantage: Using query optimization level 1 instead of
    default 5 which may result in sub-optimal access plan
    
    C) Create file below:
    
    $ cat ua_profile.xml
    <?xml version="1.0" encoding="UTF-16"?>
    <OPTPROFILE>
      <OPTGUIDELINES>
       <REGISTRY>
         <OPTION NAME='DB2_UNION_OPTIMIZATION'
    VALUE='MAX_JOINS_IN_UNION 3'/>
       </REGISTRY>
      </OPTGUIDELINES>
    </OPTPROFILE>
    
    $ cat optprofile.file
    "DBUSER","PROFILE1","ua_profile.xml"
    
    db2 import from optprofile.file of del modified by lobsinfile
    insert into systools.opt_profile
    
    
    C.1) Before query execution (affects session):
    
    db2 "set current optimization profile = DBUSER.PROFILE1"
    
    C.2) Execute query
    
    C.3) reset after query execution:
    db2 "set current optimization profile = ''"
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Queries using MQTs                                           *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Apply v11.1 M4 FP6 to DB2 database server                    *
    ****************************************************************
    

Problem conclusion

  • First fixed in v11.1 Mod 4 Fixpack 6
    

Temporary fix

  • SEE LOCAL FIX
    

Comments

APAR Information

  • APAR number

    IT32754

  • 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

    2020-05-05

  • Closed date

    2021-03-29

  • Last modified date

    2021-03-29

  • 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

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
02 June 2022