HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
porsager
postgres-benchmarks
JavaScript2022–2023
porsager / postgres-benchmarks

postgres-benchmarks

A set of benchmarks focusing on the performance of Postgres client libraries for Node.js

3Distinct people
6Mentions
0Explicit recommenders
94GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A set of benchmarks focusing on the performance of Postgres client libraries for Node.js

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month6 dated mentions

Observed mentions: 2022-03-24 19:30:34 UTC to 2023-10-14 16:02:46 UTC.

0123452022-03-01 00:00:00 UTC to 2022-04-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 commentsMar 20222022-04-01 00:00:00 UTC to 2022-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-05-01 00:00:00 UTC to 2022-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-06-01 00:00:00 UTC to 2022-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-07-01 00:00:00 UTC to 2022-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-08-01 00:00:00 UTC to 2022-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-09-01 00:00:00 UTC to 2022-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-10-01 00:00:00 UTC to 2022-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-01 00:00:00 UTC to 2022-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-12-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsDec 20222023-01-01 00:00:00 UTC to 2023-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-02-01 00:00:00 UTC to 2023-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-03-01 00:00:00 UTC to 2023-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-04-01 00:00:00 UTC to 2023-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-01 00:00:00 UTC to 2023-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-06-01 00:00:00 UTC to 2023-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-01 00:00:00 UTC to 2023-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-08-01 00:00:00 UTC to 2023-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-09-01 00:00:00 UTC to 2023-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-10-01 00:00:00 UTC to 2023-11-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsOct 2023

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Mar 20222022-03-01 00:00:00 UTC2022-04-01 00:00:00 UTC505
Apr 20222022-04-01 00:00:00 UTC2022-05-01 00:00:00 UTC000
May 20222022-05-01 00:00:00 UTC2022-06-01 00:00:00 UTC000
Jun 20222022-06-01 00:00:00 UTC2022-07-01 00:00:00 UTC000
Jul 20222022-07-01 00:00:00 UTC2022-08-01 00:00:00 UTC000
Aug 20222022-08-01 00:00:00 UTC2022-09-01 00:00:00 UTC000
Sep 20222022-09-01 00:00:00 UTC2022-10-01 00:00:00 UTC000
Oct 20222022-10-01 00:00:00 UTC2022-11-01 00:00:00 UTC000
Nov 20222022-11-01 00:00:00 UTC2022-12-01 00:00:00 UTC000
Dec 20222022-12-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
Jan 20232023-01-01 00:00:00 UTC2023-02-01 00:00:00 UTC000
Feb 20232023-02-01 00:00:00 UTC2023-03-01 00:00:00 UTC000
Mar 20232023-03-01 00:00:00 UTC2023-04-01 00:00:00 UTC000
Apr 20232023-04-01 00:00:00 UTC2023-05-01 00:00:00 UTC000
May 20232023-05-01 00:00:00 UTC2023-06-01 00:00:00 UTC000
Jun 20232023-06-01 00:00:00 UTC2023-07-01 00:00:00 UTC000
Jul 20232023-07-01 00:00:00 UTC2023-08-01 00:00:00 UTC000
Aug 20232023-08-01 00:00:00 UTC2023-09-01 00:00:00 UTC000
Sep 20232023-09-01 00:00:00 UTC2023-10-01 00:00:00 UTC000
Oct 20232023-10-01 00:00:00 UTC2023-11-01 00:00:00 UTC101

What Hacker News says

6 sources
> On the surface I'm not sure this explanation passes the smell test. Almost irrespective of how you get the data from your network card into v8 / nodejs, you're going to be crossing c++/v8 boundaries. yes, you are, but the differences are the object creation that occurs. a single buffer coming from c/c++ (a socket, let's say) can be parsed and turned into a large number of objects in javascript much more quickly. yes, you're passing through that barrier once, but creating all of those objects from c++ and passing through it 20-30 times is a lot more expensive. > Out of curiosity, do you have links to these other projects where they have similar benchmarking attempts/results? how about pg vs pg-native? https://github.com/porsager/postgres-benchmarks#results and unfortunately, I cannot find the original discussions from when node-redis w
Read the rest
ent from native to pure javascript, but it was about a 30-40% speed increase originally if memory serves (I was the one who did that original conversion after a lot of deep dives into v8 and performance crossing the barrier). as an aside, I'm also the maintainer of plv8, and am happy to discuss the same types of performance issues of dealing with jsonb vs json (which in Postgres is text): creating objects vs a simple JSON.parse() in c++ is a significant difference.
In Show HN: Postgres.js – Fastest Full-Featured PostgreSQL Client for Node and Deno
There is quite a big difference, but I'll highlight some of the main points here. Note I'm the author of Postgres.js so I'm obviously biased. Slonik is a wrapper around another node driver (pg), so it's performance is the same as that, where Postgres.js is significantly faster (2-5x)[1]. Postgres.js is also a zero dependency module, whereas Slonik has quite the dependency graph meaning - compare https://npmgraph.js.org/?q=slonik with https://npmgraph.js.org/?q=postgres. That makes it more difficult to audit the code and preventing chain attacks etc. Slonik also doesn't have the same lean straight forward developer experience as Postgres.js - again I'm biased saying that ;) Postgres.js also does things that will make your queries perform better out of the box by implicitly creating prepared statements and using pipelining. I suppose you co
Read the rest
uld build Slonik on top of Postgres.js instead of pg as well, but that would probably only make sense if migrating to Postgres.js. [1] http://github.com/porsager/postgres-benchmarks#results
In Show HN: Postgres.js – Fastest Full-Featured PostgreSQL Client for Node and Deno
Slonik is a wrapper around another Node.js postgres driver (pg). I guess slonik could be built on top of Postgres.js, but I'm not sure what the benefit would be since you get the same and more from Postgres.js. If you have an existing project using slonik it might benefit from the better performance if replacing pg with Postgres.js underneath (https://github.com/porsager/postgres-benchmarks#results)
In Show HN: Postgres.js – Fastest Full-Featured PostgreSQL Client for Node and Deno
Hi everyone. A bit more than two years ago I released the first version of Postgres.js. A fully featured PostgreSQL driver for Node.js written as a learning experience out of curiosity and annoyance with the current options. It greatly outperformed the alternatives[1] using pipelining and prepared statements, while providing a much better development experience safe from SQL injections. Since then I've been busy building things using it, now running in production, and although quite delayed I'm so happy to release a new major today with some really exciting new features: 1. Realtime subscribe to changes through Logical Replication [2] It's now possible to use logical replication to subscribe in realtime to any changes in your database with a simple api like `sql.subscribe('insert:events', row => ...)`. Inspired from Supabase Realtime you
Read the rest
can now have it yourself in Node. 2. A Safe Dynamic Query Builder Nesting the sql`` tagged template literal function allows building highly dynamic queries while staying safe and using parameterized queries at the same time. 3. Multi-host connection URLs for High Availability support It's really nice to be able to quickly spin up a High Availability Postgres setup using pg_auto_failover[3] and connect using Postgres.js with automatic failover and almost 0 downtime. 4. Deno support It also works with Deno now, completing all tests except a few SSL specific ones which requires fixes in Deno. 5. And much more Large object support, efficient connection handling for large scale use, cancellation of requests, Typescript suport, async cursors. [1] https://github.com/porsager/postgres-benchmarks#results [2] https://github.com/porsager/postgres#realtime-subscribe [3] https://github.com/citusdata/pg_auto_failover
In Show HN: Postgres.js – Fastest Full-Featured PostgreSQL Client for Node and Deno

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.