sqlite3 alternative option

Gerhard Häring gh at ghaering.de
Fri Jun 27 11:22:22 CEST 2008


Uwe Grauer wrote:
> Gandalf wrote:
>> Hi every one I'm looking for a good alternative db to replace sqlite
>>
>> I'm using pySQlite3, And I tried to translate very big database from
>> Mysql to sqlite.
>> I generated through  PHP a python script that insert 200,000 records
>> to my sqlite db and took me more then 5 hours and managed to insert
>> only  100,000 records.
>> I have almost million records so I need a better solution.
>>
> 
> Use Firebird. It has a small footprint and runs in different
> enviroments from embedded to server with single process per connection.

Firebird may be nice, but has nothing to do with this performance problem.

You'll have to make quite an effort to get such abysmal performance with 
pysqlite. Like explictly turning autocommit mode on.

On this 5 year old box and with a simplistic table, it takes 20 seconds 
to insert 200k records with index, 13 seconds without index, and 18 
seconds with creating the index after the bulk insert.

With turning autocommit mode on, inserting only 2000 records already 
takes 22 seconds!

For some reason, it's a typical newbie thing to turn autocommit on, or 
recommend doing so to others ...

-- Gerhard




More information about the Python-list mailing list