[ZODB-Dev] BTrees and id mapping (was Re: Data.fs size grows non-stop)
tseaver at palladion.com
Mon Dec 14 16:49:23 EST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Pedro Ferreira wrote:
> David Glick wrote:
>> Pedro Ferreira wrote:
>>> Hello all,
>>> So, I've been experimenting with a new structure for our date indexes,
>>> and I was considering using an IOBTree that would map integer timestamps
>>> to BTree-based sets. As for the sets, I considered two options:
>> Be careful with using timestamps as IOBTree keys. By default this type
>> of BTree uses the system integer, which on many systems is 32 bits.
>> That means that you'll overflow the maximum allowed key for timestamps
>> beyond the year 2038. It won't even give an error; it will just
>> silently overflow and overwrite existing values in the BTree.
> Yes, I know. That's one of the reasons I'm using YYYYmmdd integers
> instead (the other one being i only need 1 day resolution).
> Thanks a lot for the tip!
An LOBTree uses a guaranteed-to-be-long (64 bits) integer for the keys,
if you need that.
Tres Seaver +1 540-429-0999 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the ZODB-Dev