IBM Support

IC80526: COMPARING TIMESTAMP TYPE COLUMN WITH CHAR/VARCHAR TYPE HOST VARIABLE MAY GET SUBOPTIMAL QUERY PLAN IN V97

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as fixed if next.

Error description

  • When query statement includes a predicate comparing a TIMESTAMP
    base table column with a host variable of type CHAR or VARCHAR,
    a TIMESTAMP casting function may be added out of the host
    variable, and that may cause the predicate to be not optimized
    and evaluated very efficiently. That TIMESTAMP casting function
    can be found in "Optimized Statement" section of db2exfmt
    generated query plan.
    

Local fix

  • Change host variable type to TIMESTAMP.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 Version 9.7 Fixpack 6 or later.               *
    ****************************************************************
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    IC80526

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED FIN

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-12-20

  • Closed date

    2012-06-14

  • Last modified date

    2012-06-14

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

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

    IC84288

Fix information

Applicable component levels

  • R970 PSN

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC80526

Modified date: 14 June 2012