Hacker News new | past | comments | ask | show | jobs | submit login
EdgeDB – A graph-relational database built on top of Postgres (edgedb.com)
88 points by miraantabrez on May 3, 2023 | hide | past | favorite | 30 comments



Been using this for a toy project, and enjoying it so far!

Something I haven't quite figured out is, when using the TypeScript library, how to have more than two filters, ie x == z and y == a and b == c, without some pretty nasty nesting using the .op function.


I love this project. But what they need before I'd use it in prod is, the equivalent of an EXPLAIN command.

It's a pretty common problem for a developer to have: "this query looks like it should be fast, but actually it's slow. What's the DB doing?"

I thought I saw somewhere that EXPLAIN was coming in EdgeDB 3.0(?)


Yes, coming in 3.0 in a few weeks.


What about listen/notify?


Another query language? Why can't they just implement Cypher... I still have nightmares from trying to learn ArangoDB's AQL.


Give EdgeQL a try here, it will only take 5 minutes to get a taste of it: https://www.edgedb.com/tutorial

Most likely you'll be surprised


This is one of the projects that I’m really excited about. The thing that concerns me are it’s performance characteristics with it being written in Python. Vs something like PostgREST which is written in Haskell and blazing fast. Is there more info about performance and scaling of Edge?


Not directly what you requested, but here is some info about recent and upcoming performance improvements in Python 3.11 and beyond:

Improved CPython performance in 3.11 (released) - https://docs.python.org/3/whatsnew/3.11.html#whatsnew311-fas...

Improved parallelism in 3.12 and 3.13 - https://github.com/faster-cpython/ideas/wiki/Python-3.12-Goa...

Improved memory efficiency in 3.12 - https://github.com/faster-cpython/ideas/wiki/Python-3.12-Goa... - https://github.com/faster-cpython/ideas/wiki/Python-3.12-Goa...


To be clear, the query compiler (that turns an EdgeDB query into a SQL query) is written in Python. And AFAIK, compiling the query should be very fast compared to actually executing it!


All hot paths are in Rust or C, Postgres is the engine under the hood. Performance shouldn't be a big concern for you and will likely greatly surprise you: https://www.edgedb.com/blog/why-orms-are-slow-and-getting-sl...


Oh, very good then! Looking forward to giving it a spin. Your docs are fantastic.


Learning projects for proof-of-concept can be written in Python, but not a production database. It seems that Rust has been working its way from the corners towards the core. For instance,the edgedb-cli is a rather elaborate rust project.

Hopefully, the adoption of Rust continues through the rest of the project. I love Python but it's not the right tool for the job.


How does this compare to graph databases like neo4j? Would anyone recommend using this for working with actual graph data structures?


If you want graph algorithms -- not yet. If you want ability to easily work with hierarchical data to build apps--it's the best.


How does recursion / recursive queries work, e.g. tree-like data structures? How are cycles represented and handled? Particularly around performance?


Previous discussions on HN:

[1] Show HN: EdgeDB 1.0 (145 comments):

https://news.ycombinator.com/item?id=30290225

[2] EdgeDB 2.0 (323 comments):

https://news.ycombinator.com/item?id=32267287


I think this is awesome. This is like higher level and more readable + hopefully more efficient version of SQL.

BTW: In the nested-filters example, I don't understand how actor's `name` is being returned as `actor_name`. Where is `AS actor_name` being specified in EdgeDB's query?


It isn't. The quer returns an array `actors`, each of which has a property `name`. The SQL doesn't produce the same output, it's more like the SQL you'd write to solve the same problem.

Btw you can copy that example into the previous executable example input box and remove the reviews part to execute it.


> This is like higher level and more readable + hopefully more efficient version of SQL.

This.


> The post-SQL era has arrived

Here we go again.


That was my first reaction too. However, unlike the no-SQL monstrosities (like Mongo), this one seems to sit on top of a proper relational database, plus it seems to follow all the ol' good data modelling logic, just in a modern ish way, so I think it looks promising.

I'm not going to switch all my clients to it next week :) But it is definitely on my radar.


Is EdgeDB web scale?

Obligatory: https://www.youtube.com/watch?v=b2F-DItXtZs


It's cocky but I think this time it might be true :)

EdgeDB looks fantastic.


This is awesome and I really hope it succeeds but using it at my company means I’ll have to answer, “why can’t we just use SQL” a million times from every engineer who is dreading learning a new thing


No Java/Kotlin driver.


If they build it on top of postgres can't they use jdbc driver?


I think the parent comment meant the query libraries. The EdgeDB page lists "first-party clients for your favorite languages." They have clients for JS/TS, Go, Python, etc... but no Java/Kotlin yet.


We'll release one in a few weeks


It's not as simple as it shows from basic examples.

Complex stuff gets weird.


Weirder than the equivalent SQL? ;-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: