IBM Support

JR27631: 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:
    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;
    

Problem conclusion

  • First fixed in DB2 UDB Version 9.1, FixPak 5
    

Temporary fix

Comments

APAR Information

  • APAR number

    JR27631

  • Reported component name

    DB2 UDB EXE WIN

  • Reported component ID

    5724E4901

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2007-10-15

  • Closed date

    2008-07-07

  • Last modified date

    2008-07-07

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

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

    JR27652

Fix information

  • Fixed component name

    DB2 UDB EXE WIN

  • Fixed component ID

    5724E4901

Applicable component levels

  • R910 PSY

       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":"910"}]

Document Information

Modified date:
07 October 2021