View previous topic :: View next topic
|
Author |
Message |
Sagar_mainframe
New User
Joined: 07 Jun 2008 Posts: 34 Location: Harrisburg, Pennsylvania
|
|
|
|
If I have to delete all exixting rows and load new data the table with around 50,000 rows daily.Which approach will be faster??
COBOL-DB2 program or JCL LOAD-REPLACE utility
Also I want to know which approach will NOT LOCK the table while deleting and inserting records. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
DB2 load utility as it is ment to do that... but I did not understand what you are trying to say by this..
Quote: |
which approach will NOT LOCK the table while deleting and inserting records |
|
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
I agree the load utility is designed for that, but at 50,000 records, Cobol would not be that long.
The Load utility may put the table into check pending status, a situation you will need to rectify (reset the flag). If this happens, the table is not 'locked' but it can not be accessed until the check pending flag is reset. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Quote: |
COBOL-DB2 program or JCL LOAD-REPLACE utility |
Do you mean JCL COBOL-DB2 program or LOAD-REPLACE utility? |
|
Back to top |
|
|
Sagar_mainframe
New User
Joined: 07 Jun 2008 Posts: 34 Location: Harrisburg, Pennsylvania
|
|
|
|
I have to load around 50000 rows daily and delete the existing rows before loading.
1st approach: JCL-COBOL-DB2 pogram - First delet the records and then read the file and insert the record. Finally commit all the records.
2nd approach: JCL- Load-replace utility - This will also delete the records and replace it with new records.
So out of these two approaches which one is faster? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
2nd approach is much quicker.
and db2 does not have records, it has rows.
if you would learn correct terminology and use it in your conversations,
you would get where you want to go, quicker. |
|
Back to top |
|
|
|