my dog learned polymorphism*
The moose likes JDBC and the fly likes How to handle parallel or concurrent updates Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to handle parallel or concurrent updates" Watch "How to handle parallel or concurrent updates" New topic
Author

How to handle parallel or concurrent updates

sourabh jaiswal
Greenhorn

Joined: Jun 25, 2006
Posts: 6
Hi!,

I am doing concurrent updates on same table with java.

I have 2 cron jobs set in linux. Requirement is to execute them at same time. Both cron jobs run java code(JDBC) to update same table. I would like to know how can I perform this without hitting performance and locking table.
I am updating 50000 to 2lakh rows.

The database I am using is DB2.

Thanks,
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30136
    
150

You'll need to elaborate more on the requirement. How big is the table? Do the cron jobs do the exact same thing or do they access different rows? What kind of update query is it? What database are you using?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to handle parallel or concurrent updates
 
Similar Threads
Send Monthly News letters to registered Users
Dealing with locks with JDBC
How does jdbc handles concurrency?
cron job
Mail Alerts on birthdays