in reply to algorithm help for determining efficient db data retrieval

since any decent database caches previously retrieved data for you, this would be more of a matter of tinkering with database parameters eg. block size, size of cache, index(es). If you override (pre-program) too much caching logic into your program, then you are likely to be working against the very sophisticated caching done by the database system.
  • Comment on Re: algorithm help for determining efficient db data retrieval