in reply to algorithm help for determining efficient db data retrieval
The usual heuristic for this kind of problem is to fetch back well defined and simple sets of properties every time you fetch an object (typically "all") and then cache results (eg with a strategy similar to Memoize) so that you can decide on the fly what objects you don't need to fetch back again.
If you're fetching lots of things for differing reasons then trying to be really clever about being minimal in what you fetch generally loses to having big simple categories. Plus a KISS strategy takes less work.
A widely used module that attempts to address this problem is Class::DBI. See the section on Lazy Population.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: algorithm help for determining efficient db data retrieval
by AidanLee (Chaplain) on Apr 06, 2004 at 02:42 UTC | |
by tachyon (Chancellor) on Apr 06, 2004 at 03:14 UTC |