Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Deleting rows using utility from DB2 tables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
manugeorge2004

New User


Joined: 17 Jun 2009
Posts: 36
Location: Denver

PostPosted: Tue Jun 25, 2019 6:41 pm    Post subject: Deleting rows using utility from DB2 tables
Reply with quote

Hi

I have a requirement where I need to delete some rows from a table.
I want to do it weekly. The number of rows expected to be deleted each week is between 500k and 1 million.

I dont want to code a COBOL program for this. I want to do something like DELETE * where date(create timestamp) < current date - 1 month using a utility.

Will it cause any issue ( like -904). What is the best way to do it.

Thanks
Back to top
View user's profile Send private message

sergeyken

Active User


Joined: 29 Apr 2008
Posts: 465
Location: Maryland

PostPosted: Tue Jun 25, 2019 7:10 pm    Post subject:
Reply with quote

1) The answer depends on your DBA's settings; you can ask him.

2) You can run your own test.

3) You can split one huge DELETE into multiple DELETEs with COMMIT in between - either four statements for last four weeks, or 31 statements for last 31 days, or even (31*24) statements for last (31*24) hours...
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10608
Location: italy

PostPosted: Tue Jun 25, 2019 7:37 pm    Post subject: Reply to: Deleting rows using utility from DB2 tables
Reply with quote

no reason to waste time on this user ...

from his profile,
topics 28
posts 36


which means that he cared to follow on only 8 times
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 Unload / Load Multiple tables neo4u DB2 8 Tue Nov 27, 2018 3:43 pm
No new posts Delete Multiple rows in chunks by usi... dharmaraok DB2 5 Tue Sep 11, 2018 8:44 pm
No new posts Remove selected duplicate rows from t... hnharish DFSORT/ICETOOL 3 Wed Sep 05, 2018 3:11 am
No new posts Concatenaing multiple rows to single ... Vignesh Sid DFSORT/ICETOOL 3 Tue Aug 14, 2018 8:59 am
No new posts Utility to list Data Set Information Auryn JCL & VSAM 6 Tue Jul 17, 2018 5:03 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us