Deleting rows from PSM (Statistical Manager) tables
book
Article ID: 49729
calendar_today
Updated On:
Products
CA RC/MigratorCA Endevor SCM InterfaceDB2 AdministrationCA RC Compare for DB2 for z/OSCA RC Extract for DB2 for z/OSCA RC/QueryCA RC Secure for DB2 for z/OSCA RC Update for DB2 for z/OSCA Bind Analyzer for DB2 for z/OSCA DetectorCA SQL-Ease for DB2 for z/OSCA Sysview Performance Management Option for DB2 for z/OSCA Database Detector for DB2 for z/OSCA Plan Analyzer for DB2 for z/OSCA Subsystem Analyzer for DB2 for z/OSCA Database Analyzer for DB2 for z/OSCA Fast Unload for DB2 for z/OSCA Fast Check for DB2 for z/OSCA Fast Index for DB2 for z/OSCA Fast Load for DB2 for z/OSCA 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.
Can a query be written to clean up those rows?
What are the tables involved in storing strategies versions data?
Is there any RI built in to these tables.
Answer:
Yes a simple query can be written to delete rows from the PSM tables.
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
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.