Nostr database benchmark SQLite vs Postgres.

Reply to this note

Please Login to reply.

Discussion

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

Is the test big enough? How many rows are in the tables?

Why have you excluded MariaDB?