• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Reduce db query frequecy

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, i am trying to find an approach to reduce users' queries to database by querying more records from the database using spatial locality concept. This approach will be used in a news database. The idea is users usually want to read the latest news instead of the older one. However, some user may want to read the old news. It is very similar to the implementation of this board. Can somebody give me a suggestion?
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
great idea...why don't u use the simple convinience that web cookies provide...store cookies with user behaviour info as cookies (or in ur own database if u like...but thats only valid if users have independent log ons or static ip's etc)
and then use that information to format/sort ur resultsets?
-manav
 
SoonAnn Lim
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought about using cookies, but some parameters may change throught the whole session. Let's say i am view today's news, very likely i want to read yesterday's news. So i will pull all today's and yesterday's news into result set and keep them in session, but presenting today's news to users. If users request for yesterday's news, i just pull the information from the session, no queries are performed. This can improve the effieciency. Is there any design pattern can acheive this purpose?
 
I'm THIS CLOSE to ruling the world! Right after reading this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic