According to this test, setting PRAGMA synchronous=OFF can dramatically improve SQLite write performance.
I am well aware of the drawbacks, but would still like to try this out.
What would be the best location within a Django project to set this PRAGMA option?
I cannot do it from settings.py – at least not the way the article suggests – because from django.db import connection would cause a recursive import error.
Add this code in the
__init__.pyfile of one of your installed app: