feat(db): optimize SQLite settings for improved performance

This commit is contained in:
sankalp committed 2025-11-25 22:45:23 +05:45
1 parent 42cab7ef44
commit bf13a9524e
4 files changed
+53

No files matched your search

@@ -16,6 +16,17 @@ DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
"OPTIONS": {
"transaction_mode": "IMMEDIATE",
"timeout": 5, # seconds
"init_command": """
PRAGMA journal_mode=WAL;
PRAGMA synchronous=NORMAL;
PRAGMA mmap_size = 134217728;
PRAGMA journal_size_limit = 27103364;
PRAGMA cache_size=2000;
""",
},
}
}