-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is the pg-native recommendation outdated? #151
Comments
Can you run the benchmark to see if the line still capable. I would like to see a newly run benchmark before any action. |
My environment is like this:
The benchmark runs 10,000 queries with each client, and compares the the differences in elapsed time. On my machine, I consistently see For me personally this result makes it clear - I can ignore Meanwhile, I think it's also important to consider this quote from the postgres-benchmarks repo:
In my experience, this is 100% true. |
On Windows, the difference is still significant: Some simple queries using
The same queries now with
Node v18.16.1 (LTS) |
Would you like to send a PR to drop that recommendation? |
Why not recommend https://github.com/porsager/postgres ? Which does not rely on native modules and claims to be the fastest in town. |
Is it API compatible? |
No, |
Prerequisites
Issue
In the README, there is a section about pg-native support which states the following:
Is this claim of maximum performance still true in 2023? Does it still make sense to recommend pg-native to users?
My own findings:
According to this benchmark, the difference in performance is minimal, and actually js pg beats pg-native in 3 out of 4 tests. I've also heard anecdotal evidence from several engineers that they saw no difference in real life performance when switching between pg and pg-native.
On the other hand, there is a clear downside to using pg-native: setup can be a real pain.
Unless there's some evidence that pg-native is indeed still better, I propose changing the README to reflect the current situation, so users won't think they need pg-native for good performance.
The text was updated successfully, but these errors were encountered: