logoalt Hacker News

marcyb5sttoday at 12:52 PM1 replyview on HN

Not in anyway related with the surreal folks.

I think it is not so clear cut. I mean, the multi-model nature it is pretty neat. Yes, you can use pgvector on PostgreSQL, but here you also have native graph support. If you want to have both you need to also add something like apache AGE, but arguably that is also a small ecosystem (at least IMHO as I never heard it until I actually started looking for Neo4J alternatives). Also, pgvector has a hard limit on embedding size, while surrealdb does not. For instances in which you have less than 1M elements and retrieval performance matters surreal already has an advantage.

In my personal opinion is a great overall product. Probably not the best at anything, but close enough without having to fiddle with PostgreSQL extensions or adding another piece of machinery to support graph workloads.

The only thing I don't like is that they didn't use either pure SQL nor Cipher for the query(ies) language(s). They roll their own blend, meaning that you will likely need more work to move in the ecosystem and you can't fully use the muscle memory of users that worked with other DBs before.


Replies

CharlieDigitaltoday at 4:15 PM

    > ...add something like apache AGE, but arguably that is also a small ecosystem (at least IMHO as I never heard it until I actually started looking for Neo4J alternatives)
Outside of the most trivial use cases, I've found that AGE will not get anywhere near Neo4j in terms of performance and there's a lot of edge cases that just flat out won't work. The interesting types of queries you'd want to do in the graph end up being quite limited in AGE openCypher; I could not write very complex Cypher that would otherwise work well in Neo4j.

I appreciate having the option, but for most use cases on Pg, you are better off just using JOINs or switch to Neo4j for your graph workloads. I switched some workloads back to using different approaches of approximating "connectedness" in Pg (e.g. using Jaccard similarity)

If you do go down this route, the easiest way to get coding agents to figure out AGE is actually their regressions SQL tests: https://github.com/apache/age/tree/master/regress/sql

This has a lot of examples for the agent to know what will/won't work with AGE versus Neo4j Cypher.