Oddbean new post about | logout
 Nostr database benchmark SQLite vs Postgres.

https://media.gleasonator.com/6a8bbea6b81bf01ebede81d8f4e5953a9b925f55ebc6ece65438c98c36456d91.png 
 That's considerably faster 
 Absolutely it is 👀 
 Wow thanks! I was doing similar tests. Are you using sqlite or something like better-sqlite3? 
 wow. not what i expected 
 Sqlite is a beast! 
 No one should choose a SQL server when sqlite would suffice. If the back end and db are always going to be together, now need for aserver 
 This.  Using SQLite is often simpler and this shows that it’s also faster (at least in some cases). 
 Nice.  SQLite is awesome. 
 Are you using ‘sqlite3’ or ‘better-sqlite3’?

If you enable write ahead logging better-sqlite3 is about an order of magnitude faster.

I’ve also heard that Bun’s built in bindings are even faster than better-sqlite3 but I haven’t tested it myself 
 This is the content I'm here for. 
 Is the test big enough? How many rows are in the tables? 
 Why have you excluded MariaDB?