IBM Support

PI26148: INCORRECT OUTPUT (LESS ROW FOUND) FOR QUERY THAT USES REVERSE INDEX SCAN WITH INDEX SKIPPING

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Incorrect output - less row found with query that uses
    reverse index scan with index skipping
    
    Those cases can be identified via two explain tables.
    PLAN_TABLE.SCAN_DIRECTION=R;
    DSN_DETCOST_TABBLE.IXSCAN_SKIP_DUPS=Y
    

Local fix

  • 1/ use un-compressed tables.
    
    Note:  The problem is not related to compression.  The access
    path is index only and compression is not involved.  The process
    of decompressing the table space resulted in changing the access
    path from using index skipping + reverse index scan to using
    forward index scan.
    
    2/ re-write query, so it does not use reverse index scan + index
    skipping
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All DB2 11 for z/OS users doing              *
    *                 reverse index scans on partitioned           *
    *                 indexes.                                     *
    ****************************************************************
    * PROBLEM DESCRIPTION: Incorrect output - less rows found      *
    *                      with a query that uses reverse index    *
    *                      scan on partitioned indexes.            *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When scanning in the reverse direction within a partitioned
    index and at the same time skipping non-distinct values, valid
    index keys could be missed.
    
      Additional keywords: DB2INCORR/K, INCORROUT, SQLINCORR,
                           SQLINCORROUT
    

Problem conclusion

  • Code within DB2 has been modified to correctly begin scanning
    within the next previous partition for qualifying keys, when
    index key skipping is active.
    

Temporary fix

  • *********
    * HIPER *
    *********
    

Comments

APAR Information

  • APAR number

    PI26148

  • Reported component name

    DB2 OS/390 & Z/

  • Reported component ID

    5740XYR00

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2014-09-20

  • Closed date

    2014-11-11

  • Last modified date

    2014-12-01

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

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

    UI22940

Modules/Macros

  •    DSNKFPRV
    

Fix information

  • Fixed component name

    DB2 OS/390 & Z/

  • Fixed component ID

    5740XYR00

Applicable component levels

  • RB10 PSY UI22940

       UP14/11/27 P F411 Ž

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"DB2 for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
31 July 2023