[ZODB-Dev] KeyError in BTrees.check

2010-07-13 Thread Suresh V.
While trying to run manage_cleanup on my BTreeFolder2, I get a KeyError from the classify function in Module BTrees.check: def classify(obj): return _type2kind[type(obj)] I see that obj is None at this point. Anyway I can patch the code to run around this? Thanks. Suresh

Re: [ZODB-Dev] KeyError in BTrees.check

2010-07-13 Thread Hanno Schlichting
On Tue, Jul 13, 2010 at 11:23 AM, Suresh V. suresh...@yahoo.com wrote: While trying to run manage_cleanup on my BTreeFolder2, I get a KeyError from the classify function in Module BTrees.check: def classify(obj):     return _type2kind[type(obj)] I see that obj is None at this point.

Re: [ZODB-Dev] Indexing and dates/times

2010-07-13 Thread Jim Fulton
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. One of the problems I'm facing is that of index granularity: I'd like to

Re: [ZODB-Dev] Indexing and dates/times

2010-07-13 Thread Benji York
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

Re: [ZODB-Dev] Indexing and dates/times

2010-07-13 Thread Pedro Ferreira
So, the issue is that you have multiple items with the same key. This is simply handled by using sets as values ion a BTree. There are existing index implementations that do this. Hmm... no, in fact the problem is that most of the time I will have only one value per index entry.So, in a

Re: [ZODB-Dev] Indexing and dates/times

2010-07-13 Thread Pedro Ferreira
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) Yes, but, as I mentioned in my answer to Jim's mail, my concern is the performance of this range operation for a very large

Re: [ZODB-Dev] Indexing and dates/times

2010-07-13 Thread Jim Fulton
On Tue, Jul 13, 2010 at 7:51 AM, Pedro Ferreira jose.pedro.ferre...@cern.ch wrote: ... Hmm... no, in fact the problem is that most of the time I will have only one value per index entry.So, in a relational DB i would do something like: As I mentioned in some text you didn't quote, you could use

[ZODB-Dev] a doubt of the pool_size of zodb connection

2010-07-13 Thread firewood firewood
Hello, in ZODB.DB, I saw this: There's no limit on the number of connections this can keep track of, but a warning is logged if there are more than pool_size active connections, and a critical problem if more than twice pool_size. I think it mean that the number of connections should be less

Re: [ZODB-Dev] KeyError in BTrees.check

2010-07-13 Thread Suresh V.
Hanno Schlichting wrote: On Tue, Jul 13, 2010 at 11:23 AM, Suresh V. suresh...@yahoo.com wrote: While trying to run manage_cleanup on my BTreeFolder2, I get a KeyError from the classify function in Module BTrees.check: def classify(obj): return _type2kind[type(obj)] I see that obj is