fastest native python database?

Pierre Quentel quentel.pierre at
Thu Jun 18 09:09:41 CEST 2009

On 18 juin, 05:28, per <perfr... at> wrote:
> hi all,
> i'm looking for a native python package to run a very simple data
> base. i was originally using cpickle with dictionaries for my problem,
> but i was making dictionaries out of very large text files (around
> 1000MB in size) and pickling was simply too slow.
> i am not looking for fancy SQL operations, just very simple data base
> operations (doesn't have to be SQL style) and my preference is for a
> module that just needs python and doesn't require me to run a separate
> data base like Sybase or MySQL.
> does anyone have any recommendations? the only candidates i've seen
> are snaklesql and buzhug... any thoughts/benchmarks on these?
> any info on this would be greatly appreciated. thank you


buzhug syntax doesn't use SQL statements, but a more Pythonic syntax :

from buzhug import Base
db = Base('foo').create(('name',str),('age',int))
# simple queries
print db(name='john')
# complex queries
print [ for rec in db if age > 30 ]
# update

I made a few speed comparisons with Gadfly, KirbyBase (another pure-
Python DB, not maintained anymore) and SQLite. You can find the
results on the buzhug home page :

The conclusion is that buzhug is much faster than the other pure-
Python db engines, and (only) 3 times slower than SQLite

- Pierre

More information about the Python-list mailing list