EdgeDB is now Gel and Postgres is the future
125 comments
·February 25, 2025atombender
kelseydh
Also there are now databases purpose built for specific domains. E.g. if you are building a financial ledger I would way rather be interfacing with TigerBeetle than scaffolding an application-driven ledger around Postgres. https://tigerbeetle.com/.
If I am scraping giant amounts of data I would run far away from Postgres for other databases like Amazon Redshift.
1st1
Perhaps. The trouble usually arrives when you need functionality that your specialized database doesn’t have. Then you end up maintaining two databases and spreading your data, business logic, and resources between them. To each their own, though... there are certainly valid use cases for this.
sgarland
Tbf, at least for TigerBeetle, they make no bones about the fact that they are hyper-specialized, and they recommend using a general OLTP DB alongside it for the rest of your business logic. It’s purely a ledger DB.
gshulegaard
These days if you want a PostgreSQL based Data Warehouse both Citus and Timescale are extensions/PostgreSQL based databases I would consider before Redshift.
But even in the 9.4 days (~a decade ago) I was pushing Terabytes worth of analytics data daily through a manually managed Postgres cluster with a team of <=5 (so not that difficult). Since then there have been numerous improvements which make scaling beyond this level even easier (parallel query execution, better predicate push down by the query planner, and declarative partitioning to name a few). Throw something like Citus (extension) into the mix for easy access to clustering and (nearly) transparent table sharding and you can go quite far without reaching for specialized data storage solutions.
pgmeanspostgres
Postgres is a decent, acceptable _anything_ database.
Bisecant fractal databases like HyperKlingonDB are excellent at storing bisecant fractal data, but terrible at anything else (often, just plain terrible overall due to being immature).
freeamz
Just wonder what is the advantage of Redshift vs using something such as https://github.com/hydradatabase/columnar, if we are already using postgres?
Ygg2
TigerBeetle is impressive, but correct me if I'm wrong the schema can't be changed. To me, that that's like a single use DB, when often people don't know what they need.
RedCrowbar
The paper seems to mostly focus on the quality of cardinality estimation (mostly driven by statistics) which is admittedly one of the frequent sore points in Postgres. There's been some progress in that area though (CREATE STATISTICS being a highlight).
systay
Which is arguably the most important part of a planner. If you don't have good cardinality information, it doesn't matter if you have fancy planner strategies. They'll be employed in the wrong situation, and won't produce the good plans we all want.
ahoka
And JIT is something you would disable, because often it makes queries slower or jus unpredictable (and results are not cached AFAIK).
paulryanrogers
How does MySQL compare? I get the sense that innovations land there sooner because of all the mega corps that use it.
sgarland
MySQL hasn’t had nearly as many innovations. That said, for a long time, it was often faster for simpler queries, and especially range queries, IFF your schema was designed to exploit the fact that it’s a clustering index, so rows are physically located next to the PK. If you’re using UUIDv4 PKs, you’re throwing away its entire advantage, and Postgres will almost certainly be faster.
One notable exception for MySQL is INSTANT DDL in 8.x, thanks to contributions from Tencent, which is an extremely nice QoL upgrade that Postgres doesn’t have. The other is logical replication, something Postgres does support now (and has for several years), but didn’t for a long time.
re-thc
A lot of the work is now part of MySQL Heatwave, the paid Oracle / cloud edition.
celeryd
> So much has happened in the field of query optimization in the last 30 years, very little of which has ended up in Postgres, I think. Postgres has gotten parallel workers and a JIT, but the fundamental design is largely unchanged.
Guess I'll keep using Postgres.
NetOpWibby
> To oversimplify, Gel to Postgres is what TypeScript is to JavaScript.
I've been using EdgeDB for years (from RethinkDB and MongoDB before that) and it's my favorite database. I don't need to memorize SQL commands and I get a pretty UI to look at my data if my queries introduce issues.
1st1
<3
alangou
Tried many ORMs to get them to work in SQL, but EdgeDB's was the one that worked extremely straightforwardly, literally without any issues that weren't due to not following the instructions.
No bugs, no configuration errors, no nothing. It all just worked. So I think you guys deserve more recognition and credit for what is clearly a very well-engineered product that I intend to use for some of my personal projects.
purplerabbit
Have you tried drizzle? If so, what's your beef? (The only one I've had is lack of down-migrations)
1st1
Addressing your core question: Drizzle is a great ORM with a tastefully designed API—it's clearly a product of love. But it’s still an ORM, and it’s confined by certain design boundaries that come from being a library. For example, what if you want to use TypeScript, Go, and Python on your backend? Do you run three ORMs, each with different APIs? With Gel, you have one data model and a unified querying layer—the true source of truth.
We have a blog post about that and more [1].
---
By the way, if you visit Drizzle’s website, you’ll see that Gel is one of their biggest sponsors. We worked closely with Drizzle to ship a first-class integration with Gel. You can use Gel’s schema and migrations, and Drizzle will just work. You can even use the Drizzle query builder and EdgeQL side by side if you want.
[1] https://www.geldata.com/blog/a-solution-to-the-sql-vs-orm-di...
valenterry
> Do you run three ORMs, each with different APIs?
Yes and you absolutely have to. That's not a disadvantage, it's just how it is. Because SQL is the absolute bare minimum. The lowest common standard. And not a great one. Null handling and typesystem for example are way inferior to those of good programming languages. So why would I leave those productivity gains on the table?
Using EdgeQL simple means I have another programming language at hand.
> EdgeDB has a robust type system that's most [sic] comprehensive that most ORMs
Well yeah. And it is inferior to the programming language I use. Hence, this comes at a disadvantage to me.
> We've also built a query builder for TypeScript
Aha, so then... why not build a query builder for every language, just like with ORMs?
Sorry, not convinced. We would be better off by improving on SQL itself.
alangou
For me, personally, I do a ton of fullstack work in JavaScript-land, but also have Python services for ML-heavy needs, and it’s nice to define one schema that at its root is still SQL while generating query clients for multiple languages.
hiccuphippo
Ok, but is it gel as in gif or gel as in gif?
RedCrowbar
Gel as in gif obviously! :-)
sieabahlpark
[dead]
jakubmazanec
EdgeDB is simply great. Schema, migrations, TypeScript query builder, auth are all awesome features - I love that for my small Remix apps I don't have to create separate API layer, I just use the DB directly.
I like the new name (mostly because typing "edgedb" when using the CLI was annoying). Hopefully the new documentation will be better, because the old one wasn't very usable and a little bit sparse.
jackfischer
Tight integration with the typescript tool chain has been great for us with edgeql and is about an order of magnitude less error prone than ORMs I've interacted with. Gel is a winning formula especially in the typescript world.
1st1
Thank you Jack!
kelseydh
Postgres is great, but the level of work required to scale it on large workloads is really quite overwhelming. You really need expert-level knowledge to scale it. Just ask anybody who has had to shard their database.
zeeg
Define large workload.
Sentry runs large workloads and Postgres isn't a bottleneck. We have also never employed a DBA. Most users never need to shard their database, and at most can just partition datasets by tables for _extremely_ high volume workloads.
You just have to consider architecture and optimize things that are slow, just like any other software. Nothing is free at the end of the day, and nothing else gives you the flexibility that Postgres does, particularly these days with its growing high value extensions.
genewitch
I ran a 4000qps postgres database set to use no more than 640KB of RAM (its in the configs).
The DBA was having fun with my silly idea until Slow-Query takes 10 seconds and we flipped back over to the production systems with much more allowed memory for postgres.
My purpose was to show that Linux itself is pretty fast at caching and paging, even if Postgres was hamstrung. The db actually ran fine except for the slow queries, and we probably could have cleaned them up, too. But I proved my point.
DB was ~300GB, metal had 512GB RAM. This was in 2012.
dano
Yep. I converted a business from to Postgres in 2004 and never looked back. Stable, reliable, no surprises. Postgres is the answer until proven otherwise.
sgarland
No offense, but 4000 QPS is not large. I ran a 100K+ QPS MySQL instance with 384 GiB of RAM.
This is all subjective, of course, but I wouldn’t call 100K QPS large, either. It’s getting on the high end of what you might reasonably want to handle without horizontal scaling, but it’s still not “large.”
genewitch
postgres served 4000qps while restricted to 640 kilobytes of memory.
the_duke
Lesson: if you start a new database company, start with SQL.
Almost every DB that starts without SQL support eventually ends up adding it back in later.
1st1
True. In our case it's not that simple. By resisting adding SQL early on we were able to advance our data model & schema without SQL holding us back. And now we've added SQL in such a way that it takes full advantage of our stack.
lmm
That's like saying you should start with microservices/kubernetes/etc. because every company ends up needing those things. IMO you should delay adding SQL as long as possible so that it doesn't compromise your design.
ndriscoll
Not using SQL makes it basically a complete non-starter for any business unless it had some extremely compelling niche feature that you absolutely need and can't be found elsewhere. SQL has a massive ecosystem around it. All the examples I see are either some bespoke typescript library, or treat queries as strings. Obviously it can't hook into any of the zillion query builder libraries out there, and you'd have to go implement one or write a decent amount of code for an existing one to be able to use it. I also don't see any docs for JVM usage at all, which is like half the industry.
If you want to experiment with syntax for database queries, macros that translate to SQL at compile time seem like a much better way to get traction, but pretty much everything I've seen ends up being a more verbose cosmetic variation of SQL. The one big flaw to fix is that SELECT should have been at the end.
seer
What is the self-hosting story I wonder? If we have our own Postgres db (placed in a specific region for compliance), and we put gel onto our k8s cluster as they state in their docs, does it work well? I assume this type of deployment is free right? What features are we missing from their cloud offering?
GCP has very cool high availability, backup and monitoring features that I’d hate to loose if we move to their cloud offering. Can you configure which region your data is in? Can you put it behind / inside a VPC?
Couldn’t really find that info in the docs / pricing pages.
1st1
> What is the self-hosting story I wonder?
Fully supported, we have a guide for every popular platform [1].
> If we have our own Postgres db (placed in a specific region for compliance), and we put gel onto our k8s cluster as they state in their docs, does it work well?
If you're OK with managing Postgres and your own k8s you won't have a problem.
> I assume this type of deployment is free right?
Yes, and everything you need for that is Apache 2.
> What features are we missing from their cloud offering?
A couple:
1. Slow query log: it requires a custom C extension for Postgres (we wish it did not). It's part of Gel and is open source, but it's not allowed to deploy custom Postgres extensions, say, on AWS Aurora.
2. Integrations with Vercel [2] and GH. With our Cloud you get Vecvel Previews set up out of the box.
3. Convenience: we manage Gel Cloud and it's our headache to keep it running for you. :)
> Can you configure which region your data is in?
We're currently on AWS, but yes, you can configure a region, if you choose to use our cloud.
> Couldn’t really find that info in the docs / pricing pages.
Good point, I'll use this question as a template to add a Q&A there :)
[1] https://docs.geldata.com/resources/guides/deployment [2] https://www.geldata.com/blog/seamless-dx-with-vercel
1st1
Co-founder here - AMA.
keruli
Was the rebrand really just for simplicity and clarity? It seems like a lot of work to change the name when it was already a pretty established toolchain, not just for your team, but, and this is more important, for your community.
I actually think EdgeDB was a far better name. It actually meant something; yes, it wasn't a pure graph database, but it did work with the general concept of graphs and edges. Gel means nothing. Even the domain name: geldata.com makes no sense. You're not selling or creating data, it's a database system/layer.
I've been a true evangelist for EdgeDB over the last two years, but this has really irked me - irrationally so, I'm aware(!), but I just can't see the benefits outweighing the drawbacks here. It feels like it has to have been a result of some legal action or something.
And just as LLMs were starting to catch up with their knowledge cutoff to include EdgeDB too! Now it'll be another two years until they know what you're talking about again. I know, first world problems.
Is the query language name changing, by the way? Or is that still EdgeQL? Please let sanity prevail over at least one thing and don't call it "jel-q-ell"!
1st1
EdgeQL stays EdgeQL :) I like that name.
I also liked EdgeDB (I'm biased, I coined that name myself). But at every conference we had the same conversation with developers:
"EdgeDB? Huh, must be an edge-computing database. Are you running SQLite?"
There are other minor reasons for the rename, but this annoyance persisted for a number of years and we decided to pull the plug on it.
> I've been a true evangelist for EdgeDB over the last two years
Thank you. This means a lot.
divan
As someone who has used EdgeDB religiously for years now and still has projects with EdgeQL code generators (that use old syntax), one of my earlier requests was, "Please don't break things". Don't change the syntax of EdgeQL in a backward incompatible way, don't rename commands in the command line, etc. It's really not a big issue to remember some not-so-perfect term. Requiring thousands of people to unlearn/relearn new terms, commands, and names, and rewrite scripts and documents - is an issue. Didn't expect to see the whole name EdgeDB being replaced with another, ungoogleable name.
The argument of "some developers don't look past name and think that it's an edge-computing database" is superficial at best. I can get how it can be annoying, personally, but unless it was backed up with data showing that it hurts adoption, I wouldn't take it as a serious problem worth forcing thousands of users to switch to a new name/commands.
Following this logic, these developers could also ask "MySQL? Huh, you must be running it only on your own servers" or "Gel? Huh, is it some toy database for kids?".
I wish more people realized the enormous cognitive costs and debt created by such renamings. :/
re-thc
> But at every conference we had the same conversation with developers
I wonder if this will really go away or just be replaced with something else. Is it really the name "specifically" or how a lot of people work?
(i.e. going by first impressions, connotations, memes, etc)
> "EdgeDB? Huh, must be an edge-computing database. Are you running SQLite?"
"Gel? Huh, must be for cosmetics. Is this for retail?"
p.s. had no issues with EdgeDB.
999900000999
3 questions.
How does this compare to solutions like Supabase. What stands out with Supabase is the sdk support. My current project is probably going to stay on Supabase( it's a hobbyist project regardless), but hypothetically if I was an enterprise prospect how would you pitch your solution.
Do you support functions, that I could call from the client for more advanced logic that can't be done with queries ?
Why not brand as GelDB. Would probably be easier to Google. Plus it tells me instantly what your selling.
PS: Can you offer something like a hobbyist tier for 10$ a month. I don't want to deal with my project randomly shutting off, but I have extremely low requirements in terms of storage during development.
1st1
> How does this compare to solutions like Supabase.
Supabase is great and works well if you want vanilla (more or less) Postgres with some integrations ready to go.
With Gel you get a Postgres with a data layer on top. If you want to have a data model with abstract types & mixins that's easy to work with and scale in complexity, advanced access control, built-in migrations schema engine, hierarchical graph query language on top of SQL, more robust client libraries -- that's Gel.
Gel is opinionated and vertically integrated and that's it's core strength. All of its components were developed in tandem -- from the network protocol to client APIs, from the EdgeQL query language to the data model to the migrations engine and so forth. It provides more cohesive experience and can give you non-trivial performance and DX gains if you commit to it.
> but hypothetically if I was an enterprise prospect how would you pitch your solution.
Total TypeSafety enforced at all levels, built-in migrations engine, best in class access control (we'll be blogging about our access control vs RLS soon.)
> Do you support functions, that I could call from the client for more advanced logic that can't be done with queries ?
With Gel 6 we'll be announcing the new `net` module tomorrow (spoiler!). You'll be able to schedule HTTP calls from triggers/queries/functions.
> Why not brand as GelDB. Would probably be easier to Google. Plus it tells me instantly what your selling.
Well, rebranding from Gel to GelDB would be just a text change to the homepage, so hypothetically the door is open for that. But I hope we can make Gel work, just the same way it works for Render/Neon/Fly.
> PS: Can you offer something like a hobbyist tier for 10$ a month.
Stay tuned, we'll announce some news on that in a couple of days! :)
999900000999
Thanks!
I don't know about migrating my current project, but I'll definitely try Gel for a future project.
>Total TypeSafety enforced at all levels, built-in migrations engine, best in class access control (we'll be blogging about our access control vs RLS soon.)
Very very cool.
If I just dump my Supabase project's Postgres DB can I load the SQL into Gel and have everything work. Or would I need to setup the schema.
Ultimately I'm just looking for an open source alternative to firebase-> while amazing, I can't exactly claim to have an open source project that requires a closed source service.
Last question, Supabase heavily pushes the use of Captchas if you use any anonymous authentication. Does Gel also suggest this. Notably Firebase doesn't care, which makes it much easier on end users.
Imagine having to solve a captcha to browse Amazon and add products to your cart, you'd probably just use something else.
Ok, just one more question! How is your SDK support. JavaScript is a given, but Godot support would be nice.
d0100
How to deal with eventual slow queries? I currently have a system with complex queries with a lot of joins where I had to create a custom materialized table
These queries also deal with permissions & realtime scheduling so endpoint caching doesn't solve it
Have gel users hit any performance issues, and how have they dealt with them?
1st1
We're shipping a slow query log UI in this version to continuously monitor queries in your system.
Our users do get performance issues, usually because they start really using our data model to its full potential, creating tens / hundreds complex access policies, 100-lines long EdgeQL queries etc. We have EXPLAIN command to deal with, and we also support our customers directly helping them understand and fix their system. All of the findings trickle down to the core product so that the rest can benefit too.
armincerf
It says gel is to Postgres what typescript is to JavaScript, so can I add gel to an existing Postgres instance and get the benefits of the nicer query language or does it rely on special tables? If I use some other extension like timescale is that compatible with gel?
And is there a story for replication/subscribing to queries for real time updates?
Postgres is so powerful partly because of its ecosystem, so I want to know how much of that ecosystem is still useable if I’m using gel on top of Postgres
RedCrowbar
(article author here)
> If I use some other extension like timescale is that compatible with gel [...] Postgres is so powerful partly because of its ecosystem, so I want to know how much of that ecosystem is still useable if I’m using gel on top of Postgres
Playing nice with the ecosystem is the goal. We started off with more of a walled garden, but with 6.0 a lot of those walls came down with direct SQL support and support for standalone extensions [1]. There is a blog post coming about this specifically tomorrow (I think).
> And is there a story for replication
Replication/failover works out of the box.
> subscribing to queries for real time updates?
Working on it.
> so can I add gel to an existing Postgres instance and get the benefits of the nicer query language or does it rely on special tables?
Gel is built around its schema, so you will need to import your SQL schema. After that you can query things with EdgeQL (or SQL/ORM as before).
1st1
In the just released new version we've added SQL support, so now you can use SQL taking full advantage of our data model (access policies, mixins, etc) and the network protocol (automatic recovery on network & transaction error, automatic connection pooling on client/sever).
We'll continue bridging the gap to make it easier for companies to adopt Gel for an existing database. We either will invest in creating a tool for migration, or maybe some more exciting options we're currently pondering on.
xanth
Do you have any plans/aspirations in adding Temporal "immutable DB" functionality?
[0] https://en.wikipedia.org/wiki/Temporal_database
[1] https://github.com/scalegenius/pg_bitemporal/blob/master/doc...
RedCrowbar
You can use access policies [1] to emulate temporal data. See an example in [2]
[1] https://docs.geldata.com/reference/datamodel/access_policies
[2] https://github.com/geldata/gel/issues/4228#issuecomment-1208...
federalauth
Congrats on the rebrand and launch! Biggest reasons to use Gel over Supabase?
1st1
Good question. We’re indeed similar products.
Gel is somewhat similar to Supabase on the surface—both run on Postgres, both have Auth, and both offer AI features, a CLI, and a UI, among other similarities.
However, there’s a big difference beneath the surface: Gel comes with a high-level data model (abstract types, mixins, access policies) that replaces tables and joins. It’s still relational (and we’re about to publish a paper on that), but it’s more high level, strict, and yet more flexible.
On top of that, we have a built-in migration system (where schema is a first-class citizen), a performance-tuned network protocol, and a query language called EdgeQL, which is like a child of SQL and GraphQL. These are just a few of our “deep” features.
All in all, Gel is a fresh take on day-to-day database development. We cut no corners in trying to push the core database developer experience forward.
kelthuzad
Just a user here, but I'd say there are many reasons, one of those reasons is in your name: auth.
GelDB's auth is versatile and doesn't cost a dime, while Supabase auth is only free up until 50,000 monthly active users, then it costs $0.00325 per MAU (> 100k MAU).
I personally just love its query language and the typescript query builder.
atombender
Looks like you changed your site and broke current links. For example, searching for EdgeQL gives me this as the first hit: https://docs.edgedb.com/database/edgeql. That redirects to https://docs.geldata.com/database/edgeql, which is 404.
1st1
Yeah, we'll be repairing this shortly. FWIW we're completely revamping our documentation, it's almost a full rewrite, focused on bringing clarity and logic to the navigation, improving search, etc. We should fully wrap it up in a week or two.
Scramblejams
I'm working on some server-side Swift, and it's feeling very promising. Any plans for a Swift client library?
1st1
Not in the immediate future, but we have a member in our community who's building something. We'll see if they get near the finishing line.
greg
I used EdgeDB 5.0 for a side project, and I loved it. It reminded me of the fun of developing an app with Django or Rails, but serverless with Typescript+React.
aitchnyu
When will Python get a typesafe query builder?
Now there is
``` client.query(''' INSERT User { name := <str>$name, dob := <cal::local_date>$dob } ''', name='Bob', dob=datetime.date(1984, 3, 1)) ```
I'm interested in this and Jetbrains Pycharm and VSCode and CI to catch errors in these.
``` insert(User(name='Bob', dob=datetime.date(1984, 3, 1), children=[User(name='C', dob=datetime.date(2000, 3, 1))]) ```
1st1
Probably Python won't get a typesafe query builder until it catches up with its typing to TypeScript.
Right now in Python the generics are quite rudimentary, there's no equivalent to TypeScript's keyof or mapped types. We're using all of TS' advanced typing system features to make our query builder work.
Python will get a query builder (it's a priority for us now) soon, but it will not be a type safe one. BUT: Python, and all other languages that we support, can use codegen.
Just put your query in a `<name>.edgeql` file, and run a special command. Gel will generate a fully typed function that runs that query.
aitchnyu
Can we add filters and subqueries to query, like we do with an orm?
> PostgreSQL's query planner/optimizer is decidedly state-of-the-art
Postgres's cost-based planner is good, but it's a decidedly 1980s design, predating the famous but also outdated Volcano/Cascades systems (used by Microsoft SQL Server and CockroachDB and others).
So much has happened in the field of query optimization in the last 30 years, very little of which has ended up in Postgres, I think. Postgres has gotten parallel workers and a JIT, but the fundamental design is largely unchanged. It's also quite conservative about adding improvements; other databases has had some variation of index skip scans for ages (Oracle has probably had it for 20 years now, and you can get it through the TimeScale extension), but Postgres is still working on supporting it natively.
The state of the art is arguably Umbra [1], a research project by Thomas Neumann's group at the university of Munich, the successor to HyPer, which is now being commercialized as CedarDB. Their analysis of the Postgres query planner is an interesting read [2].
[1] https://umbra-db.com/
[2] https://www.vldb.org/pvldb/vol9/p204-leis.pdf