Skip to content

Instantly share code, notes, and snippets.

View pxpm's full-sized avatar
🏠
Working from home

Pedro Martins pxpm

🏠
Working from home
View GitHub Profile
@pxpm
pxpm / performant sqlite.md
Last active July 17, 2024 08:40
perfomant sqlite configuration

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.

  1. 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.
@pxpm
pxpm / coverage badge
Created November 22, 2022 18:37
coverage badge
Coverage Badge