Optimize SQLite
SQLite is a handy database and can be a lot more powerful that it seems but it also can use some optimization to help it get there, the following are settings I've found to help make SQLite even faster for most uses:
PRAGMA journal_mode = WAL;
PRAGMA synchronous = NORMAL;
PRAGMA journal_size_limit = 67108864;
PRAGMA mmap_size = 134217728;
PRAGMA cache_size = 2000;
PRAGMA busy_timeout = 5000;