Unfortunately, the db in question is not a btree, so I couldn't use the cursor idea.<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
I wound up using a more frequent purge interval in the short-term, which gave me enough time to put the timestamp in the value, where I could use a secondary index to get the range of expired keys I needed.<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
If you are actually using so many keys, you can use range key request in<br>
Berkeley DB. I am not sure we support it yet in pybsddb. I can not check<br>
it now. But if not, and you need it, just ask and I would add it to the<br>
new pybsddb version.<br>
</blockquote>
<br>
Is range key request limited to btrees? If not, then I'd vote for it to be included in pybsddb as well.<br>
</blockquote><div><br>Probably everybody supposed a btree because the only reason we could think off for putting a timestamp at the front of the key was to use an ordered map, and the btree is the ordered map implementation in BDB. Range key request is normally limited to ordered data structures. If you are using hashes you don't have an order relation defined ( btrees normally need less-than defined on the keys, you can derive equal from it ( a equals b is the same as not (a less than b or b less than a) , hashes need a hash function plus an equals function, and they are unordered, in fact traversing ordering usually changes as the hash table is updated and needs to be rehashed ).<br>
<br>F.O.S.<br><br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">_______________________________________________<br>
pybsddb mailing list<br>
<a href="mailto:pybsddb@jcea.es" target="_blank">pybsddb@jcea.es</a><br>
<a href="https://mailman.jcea.es:28443/listinfo/pybsddb" target="_blank">https://mailman.jcea.es:28443/listinfo/pybsddb</a><br>
<a href="http://www.jcea.es/programacion/pybsddb.htm" target="_blank">http://www.jcea.es/programacion/pybsddb.htm</a><br>
</blockquote></div><br>