[pybsddb] Problem scanning large hashed database

andrew andrew at reurbanise.co.nz
Thu Dec 4 23:34:20 CET 2008


On Thu, 2008-12-04 at 21:47 +0100, Jesus Cea wrote:
> Anyway, fully scanning the database seems a bad thing to do. You don't
> need BDB for that. Are you sure there is no other way?.

I guess the problem is that 99% of the time we're just reading and
writing single objects via a hash index (I presume this is what you get
if you're not using btrees). Another possibility is to create a separate
sortable index for the update time of each object, since that's the
second most important access method, i.e., give me the last 50K objects
updated. However, I have no idea what the maintenance overhead of that
would be and how much it would slow down the 99% of hashed reads /
writes.

Cheers, Andrew.




More information about the pybsddb mailing list