Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Will SAVEPOINT impact my application performance?

Avatar of bhagatali
bhagataliFlag for United States of America asked on
6 Comments1 Solution2038 ViewsLast Modified:

We are developing a program which reads from a table, processes the data in a COBOL/RPG program, stores the records in an array and once a certain record count (lets say 2500 records) is reached we INSERT those records in block into the target table. We COMMIT after every block INSERT.

For error handling processes, if one record fails during the COBOL/RPG processing of a block of 2500 (say for instance that the 2200th record failed), we want to COMMIT all prior records and not COMMIT the record that is being processed (the one that failed). To do this efficiently, i was hoping to set a SAVEPOINT after every successful record process. When a record in a block fails, i COMMIT till the last SAVEPOINT.

My question is, will it impact my program performance if I add a SAVEPOINT after every successful record that is processed? We are anticipating this program to process around 200 million records.

An alternate approach would then be to not use SAVEPOINT. I would COMMIT after every block INSERT and when there is an error in processing an enrollee. In this case, I will have to go back into the target table and remove the changes for the last partially processed record.

Any pointers?

Avatar of Gary Patterson, CISSP
Gary Patterson, CISSPFlag of United States of America imageExpert for hire: IBM i, AIX, Linux, Windows, DB2, Performance, Security. EDI

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answers