sqlite INSERT performance

John Nagle nagle at animats.com
Thu May 31 01:15:25 EDT 2012


On 5/30/2012 6:57 PM, duncan smith wrote:
> Hello,
> I have been attempting to speed up some code by using an sqlite
> database, but I'm not getting the performance gains I expected.

     SQLite is a "lite" database.  It's good for data that's read a
lot and not changed much.  It's good for small data files.  It's
so-so for large database loads.  It's terrible for a heavy load of 
simultaneous updates from multiple processes.

     However, wrapping the inserts into a transaction with BEGIN
and COMMIT may help.

     If you have 67 columns in a table, you may be approaching the
problem incorrectly.

				John Nagle



More information about the Python-list mailing list