IBM Support

JR45856: CMVC 221058 - Improve performance of DELETE statements invoked by the DBClean utility on DB2 databases

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • DELETE statement modification performed by the DBClean utility
    when operating on DB2 databases may not be optimal.
    
     Specifically:
     - on a single-column primary key table, a rewritten DELETE
    statement may do a redundant read
     - on a composite (multi-column) primary key table, the utility
    may lock a large amount of rows before individually deleting
    each one
    
     With this enhancement, no redundant reads will be performed on
    the tables being cleaned and DELETE statements for both
     single-column and composite primary key tables will behave the
    same. Additionally, rows will no longer be cleaned
     individually to prevent an unnecessarily large number of rows
    from being locked.
    

Local fix

Problem summary

  • USERS AFFECTED:
     WebSphere Commerce users on v7.0 with DB2 backend databases
    experiencing performance or lock contention issues during
    execution of the DBClean utility
    
     PROBLEM ABSTRACT:
     Improve performance of DELETE statements invoked by the DBClean
    utility on DB2 databases
    
     BUSINESS IMPACT:
     Execution of the DBClean utility may take longer than expected
    and may cause database concurrency (deadlock, transaction
    timeout) issues
    
     RECOMMENDATION:
    

Problem conclusion

  • To abide by the commit count provided to the DBClean utility via
     the -commit parameter, the DBClean utility modifies DELETE
    statements appropriately.
    
     Previous DELETE formats with DB2 databases:
    
     1. For tables with single-column primary keys, a DELETE
    statement such as this:
     DELETE FROM <table> <predicates>
     would take the form:
     DELETE FROM <table> WHERE <pk> IN (SELECT <pk> FROM <table>
    <predicates> FETCH FIRST <commit> ROWS ONLY)
    
     2. For tables with composite primary keys, a DELETE statement
    such as this:
     DELETE FROM <table> <predicates>
     would take the form:
     SELECT 1 FROM <table> <predicates> FETCH FIRST <maxrows> ROWS
    ONLY
     A cursor would be opened on this statement and iterated over
    with each row being deleted individually. A commit would be
    issued once <commit> number of rows were iterated.
    
     1. causes an extra read to be performed on the table
     2. may cause an excessively large number of rows to be locked
    with an UPDATE lock
    
     To alleviate both concerns, DELETE statements are now modified
    to:
     DELETE FROM (SELECT 1 FROM <table> <predicates> FETCH FIRST
    <commt> ROWS ONLY)
    
     This removes the extra table access caused by 1. It also
    discards requirement to potentially lock and individually delete
    large number of rows from 2.
    
     -------------------------------------------------------------
     The latest available maintenance information can be obtained
    from the Recommended Fixes for WebSphere Commerce technote:
     http://www.ibm.com/support/docview.wss?rs=3046&uid=swg21261296
    

Temporary fix

Comments

APAR Information

  • APAR number

    JR45856

  • Reported component name

    WC BUS EDITION

  • Reported component ID

    5724I3800

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-02-27

  • Closed date

    2013-09-25

  • Last modified date

    2013-09-25

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

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

Fix information

  • Fixed component name

    WC BUS EDITION

  • Fixed component ID

    5724I3800

Applicable component levels

  • R700 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSYSYL","label":"WebSphere Commerce Enterprise"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
25 September 2013