• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Do I get better performance from running a query once a day and saving the info in an object?

 
Archie Sheran
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I inherited an application which opens to the public every february. During this february I was having up to 300 concurrent users acessing in less than a minute. I used up 60% of the cpu on a shared server and database connectivity was slooooooowwwwwwwww,aside from increasing the connection pool I would like to visit the database less often. Instead of going to a tablewith a list of city names and their code number I want to save this information into a java singleton object (the application goes down everyday at midnight for 10min while the information in the databse is extracted elsewhere so the singleton will be refreshed everyday and the list of cities hasnt been modified for years). Would I see a peformance benefit if I save this information in memory? (It is queried everytime a user logs in).

Thanks.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34965
378
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Archie Sheran wrote: Would I see a peformance benefit if I save this information in memory? (It is queried everytime a user logs in).

Absolutely!
 
Archie Sheran
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks bud appreciate it
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic