Page 1 of 1

Multi-row Insert vs DB2 Load Utility

PostPosted: Mon Aug 26, 2013 12:33 pm
by thisak
In my project, I have to design a Job which should read a file, validate and load into DB2 tables. There are 2 different file volumes i.e. one comes with 5 - 10 million records (of LRECL 500 approx.) and other file with 20K to 100,000 records (of LRECL 400 approx.). I have to decide on either having single program which does all validation and load data directly into Table thro Multi-row Insert, Or having a program which prepares load dataset and then thro BMCLOAD load utility inserting into the Table. Can you please suggest me which approach will be best (if possible with data facts)?

Re: Multi-row Insert vs DB2 Load Utility

PostPosted: Mon Aug 26, 2013 6:51 pm
by dick scherrer
Hello and welcome to the forum,

Suggest you edit the values in one process and use the utility to load the data after validation.

Individual inserets cost much more than the utility to load the data.

Re: Multi-row Insert vs DB2 Load Utility

PostPosted: Mon Aug 26, 2013 6:56 pm
by thisak
How about using Multi-row insert (Cursor) concept.

Re: Multi-row Insert vs DB2 Load Utility

PostPosted: Mon Aug 26, 2013 7:03 pm
by dick scherrer
Hello,

Still uses a Lot more resources.

Even if multi-row is used, the insert still has to deal with one row (and the associated index entries) at a time.
Which means lots of overhead.

Re: Multi-row Insert vs DB2 Load Utility

PostPosted: Mon Aug 26, 2013 10:02 pm
by prino
If you have one program that ensures your data is valid, you can load the data with a utility and tell it not to log anything, which will save, been there done that, vast amounts of time!