IBM Support

IC68939: PERFORMANCE ISSUE WHEN CAST AROUND LITERAL FOR BIT DATA IS PRESENT

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • This problem happens ONLY WHEN CAST for BIT DATA and only when
    it is on one side and not another and only when literals.
    DB2 generate non-optimal plans because BIT_STRING function is
    injected and it prevents certain optimization logic. Please
    consider the following examples:
    
    CAST(x'00' AS CHAR(1) FOR BIT DATA) = CAST(x'01' AS CHAR(1) FOR
    BIT DATA)
    - will perform well
    
    x'00'    = x'01'
    - will perform well
    
    CAST(x'00' AS CHAR(1) FOR BIT DATA) = x'01'
    - here PERFROMANCE is BAD.
    

Local fix

  • rewrite the statement in the following manner
    CAST(x'00' AS CHAR(1) FOR BIT DATA) = CAST(x'01' AS CHAR(1) FOR
    BIT DATA)
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * This problem happens ONLY WHEN CAST for BIT DATA and         *
    * onlywhenit is on one side and not another and only when      *
    * literals.DB2 generate non-optimal plans because BIT_STRING   *
    * functionisinjected and it prevents certain optimization      *
    * logic. Pleaseconsider the following examples:CAST(x'00' AS   *
    * CHAR(1) FOR BIT DATA) = CAST(x'01' AS CHAR(1)FORBIT DATA)-   *
    * will perform wellx'00'    = x'01'- will perform              *
    * wellCAST(x'00' AS CHAR(1) FOR BIT DATA) = x'01'- here        *
    * PERFROMANCE is BAD.                                          *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 9.7 FP3                                       *
    ****************************************************************
    

Problem conclusion

  • Problem was first fixed in Version 9.7 Fix Pack 3
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC68939

  • 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-06-03

  • Closed date

    2010-10-19

  • Last modified date

    2010-10-19

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

    JR33488

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

Document Information

Modified date:
19 October 2010