• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

advise regarding putting the data in application scope

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

I have an application in which the data shown on the main page comes from the database and remains static for a period of time. like say 1-2 days, and it changes after that.

Now, since that data is on the main page and will be accessed frequently, i dont want to query the database each and every time.

So, what i plan to do is while starting the application, have a startup servlet, put the data in the application scope and after each day, a thread will run which will take the latest
data from the DB, and replace the data in the application scope..

Now, the problem is that i am not sure how much it will impact the performance if i have put the data in the application scope.

I plan to put around 40-50 rows from a table, having around 4 columns each.

Is it a decent idea to put this much of data in the application scope and not go to the DB every time.

Also, "roughly" how much will the performance be affected?

Any other comments/ideas regarding the same are greatly appreciated.

Thanks,
 
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unless your rows have thousands of columns, this is a miniscule amount of data and will cause no problems.
 
Rahul Babbar
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks..
 
reply
    Bookmark Topic Watch Topic
  • New Topic