This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32633
    
215

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?


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, 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
 
It's not a secret anymore!