View previous topic :: View next topic
|
Author |
Message |
vasudevan_c
New User
Joined: 15 Apr 2008 Posts: 7 Location: bangalore
|
|
|
|
Hi All,
Can anyone tell me how does multiple rows can be performed in an application program. PFB the requirement
Its a table, which will receive daily insert and delete files. The primary key is field called Trace id. I will get this Trace id in my input file to delete the record from the table. The delete volume that i may get is around 10 million. But problem is another similar table, for deleting 600K rec took 38 mins, so going by this for deleting 1000K rec it wl take hours to complete. As this table is expose to online as well...i can not go ahead with single row delete. So please suggest me any approach so that i can delete multiple row together, with better performance.
Thanks,
Vasu |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Define PFB. DB2 tables have rows, not records. For that many deletes, I'd unload the table, delete the appropriate records from the unloaded file, then reload the table. |
|
Back to top |
|
|
vasudevan_c
New User
Joined: 15 Apr 2008 Posts: 7 Location: bangalore
|
|
|
|
Thanks a lot Terry.
But tell me one thing, is it advisable to use load utility daily for an table?
Thanks,
Vasu |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Vasudevan,
Quote: |
But tell me one thing, is it advisable to use load utility daily for an table? |
We do it, in our everyday batch cycle, for a lot of tables. So, what's the problem in that.
Sushanth |
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
Use DISCARD REORG with the proper conditions. It much faster than normal delete. But you need to provide where clause for delete which in your case keeps on changing as per the input file. |
|
Back to top |
|
|
|