Use integer keys in Berkeley DB with python (using bsddb3)
I want to use BDB as a time-series data store, and planning to use the
microseconds since epoch as the key values. I am using BTREE as the data
store type.
However, when I try to store integer keys, bsddb3 gives an error saying
TypeError: Integer keys only allowed for Recno and Queue DB's.
What is the best workaround? I can store them as strings, but that
probably will make it unnecessarily slower.
Given BDB itself can handle any kind of data, why is there a restriction?
can I sorta hack the bsddb3 implementation? has anyone used anyother
methods?
I have the same problem
ReplyDelete