plv8
postgres-benchmarks
plv8 | postgres-benchmarks | |
---|---|---|
13 | 4 | |
1,854 | 69 | |
0.9% | - | |
6.6 | 10.0 | |
about 2 months ago | about 3 years ago | |
C++ | JavaScript | |
GNU General Public License v3.0 or later | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
plv8
- Supabase Storage: now supports the S3 protocol
-
PLJS – JavaScript Language Plugin for PostreSQL
a bit more than an experiment at this point. pljs, even in its early state, has some very good results: https://github.com/plv8/plv8/issues/531#issuecomment-1627883...
passing through v8's javascript/c++ membrane has always been painful, and appears to be getting worse.
-
Sending Email From Postgres
From here you'll write a send_email function in Postgres that calls the API. I initially wrote the entire function in PLpgSQL and spent an entire day to get it debugged and working. And even then I wasn't happy with it. In my opinion that language is unintuitive and difficult to learn and debug. I switched over to PLV8, an extension for Postgres that supports writing functions in Javascript. It takes one click in the Supabase UI to enable this extension, and it will save hours and hours of time.
-
I wrote a database engine in Typescript
You jest, but the evil geniuses at plv8 have already done it for Postgresql.
-
Surrealdb – FOSS document-graph database, for the realtime web in Rust
To be honest I haven't used it, but I've extensively used pl/pgsql and a little pl/ruby, and know that https://plv8.github.io/ exists - it might be what you're looking for and it's on my list of things to play with
- PLV8 is a trusted Javascript language extension for PostgreSQL. It can be used for stored procedures, triggers, etc.
- PLV8 JavaScript Procedural Language Add-On for PostgreSQL
-
Show HN: Postgres.js – Fastest Full-Featured PostgreSQL Client for Node and Deno
but, let's take your straw man a little further. let's suppose that all of the actual parsing is done for you already, and all you're doing is iterating through the data structure, creating objects through the c++ api, and calling it good. that should be faster than calling the c++ JSON.parse(), shouldn't it? since we don't have to actually parse anything, right? no, it's actually much slower. you can see this in action at https://github.com/plv8/plv8/blob/r3.1/plv8_type.cc#L173-L60...
again, we're not talking about whether javascript in an interpreter is faster than c++, we're talking about whether v8's api causes enough slowdown that some workloads that require a lot of data between c++ and javascript are slower than the same workload that requires very little data between c++ and javascript ... because passing through v8's c++/javascript membrane is slow.
- Is there an efficient and easy way to duplicate a row an all relations?
- PLV8: V8 Engine JavaScript Procedural Language Add-On for PostgreSQL
postgres-benchmarks
-
PostgresJs: The Fastest full featured PostgreSQL client for Node.js and Deno
There's a link to a simple Benchmark right after the title.
Here are two:
https://github.com/porsager/postgres-benchmarks
https://porsager.github.io/imdbench/sql.html
-
Does Prisma work in production?
and really fast (https://github.com/porsager/postgres-benchmarks) even faster than the native postgres
-
Show HN: Postgres.js – Fastest Full-Featured PostgreSQL Client for Node and Deno
> 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 went 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.
What are some alternatives?
Marten - .NET Transactional Document DB and Event Store on PostgreSQL
prisma-redis-middleware - Prisma Middleware for caching queries in Redis
orioledb - OrioleDB – building a modern cloud-native storage engine (... and solving some PostgreSQL wicked problems) 🇺🇦
postgres - Postgres.js - The Fastest full featured PostgreSQL client for Node.js, Deno, Bun and CloudFlare
pg_auto_failover - Postgres extension and service for automated failover and high-availability
pgtyped - pgTyped - Typesafe SQL in TypeScript
node-redis - Redis Node.js client
Prisma - Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
pgaudit - PostgreSQL Audit Extension
MuchPIR - Homomorphic Encryption PIR Postgres C/C++ Agregate Extension.
pitwall-pg - A postgres library to help write safe, parameterized, transaction-aware SQL for when an ORM or query builder isn't the right tool for the job