"One thought that you may want to consider is caching x number of values at a time. When the item changes, check the cache FIRST(in a hash based on the index number as the key), and only if you do not find the cached data, then do the DB lookup. "
o o o <snip> Of note is an article in the Association of Computing Machiner 1985 Computing Surveys magazine titled: Self-Organizing Linear Search pp 295 - 311 ACM Computing Surveys 1985 V17N3 It describes different means to optimize searches and includes a description of a pre-search cache of temporary values. Amortized costs are included. On a different note, the proposed but not built Burroughs B8000 contained a hardware 'cache' of frame pointers to enable quick access to objects in nested procedures. (About 1970). art