IBM Support

IT33995: POPULATED STATISTICS WERE NOT CLEANED UP AFTER ALTER TABLE ALTERCOLUMNS

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • By design, dropping a column or changing its data type removes
    all statistics information from the table being altered, and
    Statistics must be recollected after it is again accessible.
    
    However, it seems that ALTER TABLE is using the presence of the
    latest_statsrun_offset(command "db2cat -d <dbname> -s <schema>
    -n <tbname> -o <tbname>.pd" can used to dump out
    latest_statsrun_offset value) as an indication of whether
    statistics exist, but it won't exist if stats have been set
    manually using UPDATE SYSSTAT statements(i.e. the db2look mimic
    approach) instead of actually running runstats, as a result, the
    statistics won't be cleaned up.
    
    The statistics need to be cleaned up regardless of how they were
    set or collected because the column alteration could mean that
    the statistics are inconsistent with the data type i.e. wrong
    length, wrong format etc.
    

Local fix

  • Run RUNSTATS against the table to remove and collect the latest
    statistics after the table is again accessible after alter table
    operation.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * n/a                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 for LUW V11.1 Mod4 Fixpack6 or later.         *
    ****************************************************************
    

Problem conclusion

  • This problem is firstly fixed on V11.1 Mod4 Fixpack6.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT33995

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-08-25

  • Closed date

    2021-03-21

  • Last modified date

    2021-03-21

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

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

    IT34032

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1"}]

Document Information

Modified date:
22 March 2021