Joined: 05 Jun 2009 Posts: 185 Location: Planet Earth
I have a Weekly job, which unloads an entire table for backup followed by a IKJEFT01 step that deletes the records that are older than an year. The delete step consumes high CPU than the unload step (18 minutes vs 34 seconds). I was wondering if replacing the delete step with a DB2 LOAD REPLACE to load the last year's data will help.
The table currently contains about 3.8 Million records and about 30K records are deleted weekly. The date field that is used in the WHERE clause is not a part of any index in the table.
It would really help if someone can provide some pointers to guide me if LOAD REPLACE can help reducing the CPU time consumed by IKJEFT01 DELETE SQL.
Time being I think you can unload the table completely , use a sort to remove data which (older than oneyear) and then use this file and run LOAD REPLACE. Check for the CPU stats and let us know.