• Post Reply 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

multiple thread polling the table

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have 12 threads polling one database table. When the program is actively running, the response is very slow in Query Analyzer for a select statement querying the same table. Anybody know what is the cause of that ? and any ways to prevent this ?
Am I updating the database table too frequently and eat up all the resources 'coz the threads are updating the status column of the result set.

Thanks in advance.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cibin,
Welcome to JavaRanch!

Some questions to help pinpoint the error?
1) How long does this select take if you do a single query while no updates are running? If it isn't very short, maybe the query can be tuned.
2) How long does a single update take if nothing else is happening? If it isn't very short, the updates could be grabbing write locks for a long time.
3) Are all the threads/updaters within the same JVM? Or are some of them? If so, you may not need a database hit each time.
 
reply
    Bookmark Topic Watch Topic
  • New Topic