Jan S. Rellermeyer wrote:
Well, on the other hand, a cache is only of use if the requests are not
totally random. Otherwise, you cache results that are never needed again.
What Alex is describing sounds to me like a data index. I agree that this
does not work for an unbounded set of properties. However, what might work
is something like the index structures used in database technology. What about a Hashtable (or better -Map) with B+-Trees as values.

Yeah unfortunately you have to use BTrees here to properly advance on an *sorted* index and evaluate expressions like numeric comparisons (version > 3.0). You cannot do this with a Hash unfortunately.

So the
property name is the key, which means, all properties will fit into one
table and providing that the properties have a reasonable distribution, the
lookup of a property is in constant time. Each value is a B+-Tree, which
allows you to have very efficient lookup of the complicated range
structures, for instance, in the version property. Would something like this
make sense ?

Yep perfectly. Wanna work it with me in the sandbox? I may be able to get something going rapidly using jdbm.

Alex

Reply via email to