bsddb3 database file, are there any unexpected file size limits occuring in practice?

Klaas mike.klaas at gmail.com
Tue Feb 28 19:44:26 EST 2006


> In my current project I expect the total size of the indexes to exceed
> by far the size of the data indexed, but because Berkeley does not
> support multiple indexed columns (i.e. only one key value column as
> index) if I access the database files one after another (not
> simultaneously) it should work without problems with RAM, right?

You can maintain multiple secondary indices on a primary database.  BDB
isn't a "relational" database, though, so speaking of columns confuses
the issue.  But you can have one database with primary key -> value,
then multiple secondary key -> primary key databases (with bdb
transparently providing the secondary key -> value mapping if you
desire).

> Do the data volume required to store the key values have impact on the
> size of the index pages or does the size of the index pages depend only
> on the number of records and kind of the index (btree, hash)?

For btree, it is the size of the keys that matters.  I presume the same
is true for the hashtable, but I'm not certain.

> What is the upper limit of number of records in practice?

Depends on sizes of the keys and values, page size, cache size, and
physical limitations of your machine.

-Mike




More information about the Python-list mailing list