MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Performance improvements to a batch COBOL/DB2 insert pgm
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Wed Jun 16, 2010 7:48 am    Post subject: Reply with quote

Follow dbz's advice. Bite the bullet and fix the problem. I'd recommend converting the random number column to an IDENTITY column. The added benefit of using an IDENTITY column is that you could consider using the LOAD utility. Yes, you'd need to unload, drop, recreate, and reload the table, but you'd fix the problem completely and eliminate all these round about work arounds.
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Wed Jun 16, 2010 10:31 am    Post subject: Reply with quote

How many records are in the table before you insert, what is the relationship between records already available and the number of records you are inserting?
Back to top
View user's profile Send private message Visit poster's website
geetha001
Beginner


Joined: 22 Jun 2005
Posts: 41
Topics: 14

PostPosted: Wed Jun 16, 2010 6:25 pm    Post subject: Reply with quote

I totally agree with jsharon1248 and dbz. Infact all the options available were reviewed and yes between random number and identity, identity key would be the best solution. But unfortunately, using identity at this point is too invasive and the impact is so huge (millions of records to be converted, other child table conversions etc.,) that people at my shop do not prefer to take that approach (sequencing). A workaround is what is being considered for now inspite of known difficulties.

Thank you all very much for all your inputs and I will post back the approach that will be taken.

Quote:

How many records are in the table before you insert, what is the relationship between records already available and the number of records you are inserting?


There seems to be no relation to the records in the table and that being inserted, since the key is the ID number.

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


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Jun 16, 2010 8:14 pm    Post subject: Reply with quote

even with millions of records,
the tables could be converted to identity in 24 hours.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Thu Jun 17, 2010 3:47 am    Post subject: Reply with quote

geetha001, my question was to know if you really need to insert those records, or if a merge would be better, or ..... If you have very few records to start off with and you are inserting a larger number of records into that then maybe the whole process should be reviewed and perhaps a faster solution used.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group