On Tue, Jul 13, 2010 at 4:35 AM, Pedro Ferreira <jose.pedro.ferre...@cern.ch> wrote: > Hello, >>> I am currently trying to devise a way to index and retrieve some >>> millions of objects according to their modification date/time.
> So, in a relational DB i would do something like: > > SELECT * FROM table WHERE timestamp >= X AND timestamp <= Y > > Since I cannot do this with ZODB, I'd have to have a BTree, indexed by > timestamp... however, as you said, if I want "to the second" > granularity, I will rarely have two items with the same key (which makes > it pretty useless). If you use the timestamp as the key and you want to retrieve all values between two timestamps (inclusive), you can do my_btree.values(min=start, max=end) -- Benji York _______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev