Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Simultanious Insert

Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi All,

I am using basic java1.4 and db2 version 9

I have 4 java classes , all having main methods. These 4 java classes are run from Unix. They can either be scheduled to execute at same time or at different times.
The 4 java classes read 4 different text files. The data in the 4 text files are different from each other.
The 4 java classes insert the values to same table (example: Employee Table) .

The problem is if they are all called at the same time how can we avoid table locking. As the data which these java classes are inserting in the Employee table is very huge more that 50000 records. How can we maintain the performance.

1. I was thinking to use synchronize keyword for the method where I insert the data. But it will degrade the performance.
2. Is there any way ....procedures or batch update can help?

Any suggestion or solution someone might have used?
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please don't post the same question on multiple forums. It wastes people's time if they respond without knowing what other people have already said in another forum. I think the JDbc forum is the best choice for this question, so I'm closing this one. Please follow up here.
It means our mission is in jeapordy! Quick, read this tiny ad!
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic