10.2k sats \ 5 replies \ @tamstrup 21 Feb 2023 freebie \ on: booger: A nostr relay nostr
I can highly recommend Postgres.js as an alternative to pg. Performs great, supports pipelining and a more ergonomic way of building queries.
https://github.com/porsager/postgres
It looks excellent.
A nostr relay is pretty light on requirements query-wise, but I imagine postgres.js would be a good choice for an application with more query variety.
reply
Not to belabor the point, but just wanted to add a link to the benchmarks: https://porsager.github.io/imdbench/sql.html
reply
I swapped it in.
- 30% faster performance in my integration tests alone
- the code is more concise
- I got rid of a handful of deps
Thanks again!
reply
Glad to help! 😊
reply
No, you were right. Pipelining is enough reason to switch. Was planning on rewrite it with postgresjs today.
reply