IBM Support

JR27652: SQL1585N ERROR MESSAGE WHEN THE DB2_REDUCED_OPTIMIZATION AND DISTINCT FUNCTION ON LARGE COLUMNS (CLOB, DBCLOB, BLOB)

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A query may generate SQL1585N error message when the
    DB2_REDUCED_OPTIMIZATION registry variable is set and the query
    involves a DISTINCT function on large columns, CLOB, DBCLOB,
    BLOB, etc or when a sub-select contain a large column also
    contains an EXISTS or IN subquery. For example the following
    query can generate the SQL1585N.
    
    SELECT  CHARCOLUMN,
            LARGECOLUMN
    FROM    TableA
    WHERE CHARCOLUMN2 IN
            (SELECT #tt2.REFFIELDRRef
            FROM    session.#tt2
            )
    ORDER BY CHARCOLUMN;
    

Local fix

  • Unset the DB2_REDUCED_OPTIMIZATION registry variable and restart
    the database instance
    

Problem summary

  • USERS AFFECTED: ALL
    PROBLEM DESCRIPTION:  SQL1585N ERROR MESSAGE WHEN THE
    DB2_REDUCED_OPTIMIZATION AND
    DISTINCT FUNCTION ON LARGE COLUMNS (CLOB, DBCLOB, BLOB)
    PROBLEM SUMMARY:
    A query may generate SQL1585N error message when the
    DB2_REDUCED_OPTIMIZATION registry variable is set and the query
    involves a DISTINCT function on large columns, CLOB, DBCLOB,
    BLOB, etc or when a sub-select contain a large column also
    contains an EXISTS or IN subquery. For example the following
    query can generate the SQL1585N.
    
    SELECT  CHARCOLUMN,
            LARGECOLUMN
    FROM    TableA
    WHERE CHARCOLUMN2 IN
            (SELECT #tt2.REFFIELDRRef
            FROM    session.#tt2
            )
    ORDER BY CHARCOLUMN;
    

Problem conclusion

  • First fixed in DB2 UDB Version 9.5, Fix Pack 1
    

Temporary fix

Comments

APAR Information

  • APAR number

    JR27652

  • Reported component name

    DB2 UDB EXE WIN

  • Reported component ID

    5724E4901

  • Reported release

    950

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2007-10-17

  • Closed date

    2008-05-03

  • Last modified date

    2008-05-03

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

    JR27631

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

Fix information

  • Fixed component name

    DB2 UDB EXE WIN

  • Fixed component ID

    5724E4901

Applicable component levels

  • R810 PSN

       UP

  • R820 PSN

       UP

  • R910 PSN

       UP

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

Document Information

Modified date:
07 October 2021