durusmail: durus-users: PersistentDict vs BTree
PersistentDict vs BTree
2006-10-03
2006-10-03
2006-10-03
2006-10-03
2006-10-05
2006-10-05
2006-10-05
2006-10-05
2006-10-11
2006-10-11
2006-10-11
2006-10-12
2006-10-12
2006-10-12
2006-10-13
2006-10-13
2006-10-13
2006-10-13
2006-10-13
2006-10-13
Re: PersistentDict vs BTree
2006-10-23
2006-10-31
PersistentDict vs BTree
David Binger
2006-10-03
On Oct 2, 2006, at 9:02 PM, Mike Orr wrote:

> At what point is it better to use a BTree rather than a PersistentDict
> of Persistent values?  My goal is to keep only a few values in memory
> at a time (for display) while still being able to iterate all values
> efficiently (for an advanced search).
>
> I assume a BTree with Persistent values is overkill since the BTree
> value would be only a stub.

Performance will usually be best when the number of loads is
kept as low as possible.   A BTree of non-persistent (small) values
probably has an advantage in this area since loading a
single BTree node would give your connection access to
a set of (16 by default) values.  I assume that your application is
not writing in the BTree.

A BTree of Persistent values may indeed be overkill if your usage
patterns are limited to those you describe here.  In general, though,
a BTree of Persistent values is an attractive structure.








reply