ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Deleting rows from PSM (Statistical Manager) tables

book

Article ID: 49729

calendar_today

Updated On:

Products

RC Compare for DB2 for z/OS Bind Analyzer for DB2 for z/OS SQL-Ease for DB2 for z/OS SYSVIEW Performance Management Option for DB2 for z/OS Plan Analyzer for DB2 for z/OS Subsystem Analyzer for DB2 for z/OS Database Analyzer for DB2 for z/OS Fast Unload for DB2 for z/OS Fast Check for DB2 for z/OS Fast Index for DB2 for z/OS Fast Load for DB2 for z/OS Rapid Reorg for DB2 for z/OS

Issue/Introduction

Question: 

 

There are unneeded versions of strategies that need to be cleaned up from the PSM (Statistical Manager) tables.

  1. Can a query be written to clean up those rows?
  2. What are the tables involved in storing strategies versions data?
  3. Is there any RI built in to these tables.

Answer: 

  1. Yes a simple query can be written to delete rows from the PSM tables.

  2. There are five PSM tables involved :
    PTPS_DBASTATS_1200
    PTPS_SYSSTATS_0702
    PTPS_STRAT_0702
    PTPS_OBJECTS_0702
    PTPS_MASKS_0702

    # is the suffix indicating the release e.g.1200, 0702

  3. No RI exists between these tables, but the same key NAME, CREATOR, PRODUCT and VERSION are used across all 5 tables. Potentially, you would want to delete the version from all 5 tables. VERSION = 0 is always the strategy and 1-n are the possible strategy versions.

Environment

Release:
Component: PPADB2