[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Commit Frequency in PL/SQL

Posted on 2004-11-11
1
Medium Priority
?
1,234 Views
Last Modified: 2006-11-17
Hello,

I have a PL/SQL procedure that will open up a cursor and process records one at a time to load them into another table.  I will be processing ~4,000 - 5,000 records per run.  I don't want to commit each record, but I also don't want to wait until the end to commit.

How can I set the commit frequency in my PL/SQL procedure to commit, say, every 500 records?

Thanks,
Chris
0
Comment
Question by:ccorrente
1 Comment
 
LVL 4

Accepted Solution

by:
boriskalavsky earned 500 total points
ID: 12561766
for c1rec in c1_cursor loop
   .......
   .......
   i := i+1;
   if mod(i,500)
      commit;
   end if;
end loop;
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question