CREDIT: Nikita Melkozerov @meln1k how I squeeze 60K RPS out of SQLite on a $5 VPS:
There are tons of tutorials on how to setup SQLite, and sometimes they contradict each other. Here is what worked for me.
- Configuring PRAGMAs. We need to send the following PRAGMA commands right after opening the connection:
PRAGMA journal_mode = WAL;
- enables write-ahead log so that your reads do not block writes and vice-versa.