sqlite issue in 2.7.5

Joseph L. Casale jcasale at activenetwerx.com
Mon Sep 9 20:42:20 EDT 2013


> This pragma speeds up most processes 10-20 times (yes 10-20):
> pragma synchronous=OFF
>
> See the SQLITE documentation for an explanation.
> I've found no problems with this setting.

Aside from database integrity and consistency? :) I have that one set
to OFF as my case mandates data processing and the database is secondary
and not re-used, nor required if the process halts.

The issue I actually had was after several large bulk inserts, statistics for
indices were no longer valid and the statements performing several joins
that would leverage them were not performing well. Not knowing this and
accessing the data from different methods would cause the symptoms to
manifest to varying degrees.

Ultimately, after all the inserts I run an ANALYZE command that takes ~30
seconds and a query that normally takes ~2 hours was done in less than 2
seconds.

jlc



More information about the Python-list mailing list