• 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

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
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

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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks bud appreciate it
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic