I'm not sure if you are serious or joking. "6 degrees of separation" is the famous radius for how many steps are needed such that everyone is connected.
Except that it wasn't about people at all? I was just referring to a _type_ of query
What kind of data was it, of I may ask?
Graph databases have a very narrow usecase, and it's almost always in relation to people - at least ime.
Though the data type isn't really important for the performance question, the amount of data selected is. So a 6-level depth graph of connections that only connect 2-3 entities would never get into performance issues. You'd be able to go way beyond that too with such a narrow window. (3 entity Connections on 6 level join would come out to I believe ~750 rows)
If you're modeling something like movies instead, with >10 actors per production you're looking at millions of rows.
Network analysis of financial transactions to detect "layering" (onion-routed money laundering) paths, probably.
Re:Representing Graphs in PostgreSQL
by zaphirplane on Tuesday February 18, 2025 @02:11AM
(#43086863)
Too funny, enjoy the vote
Re:Representing Graphs in PostgreSQL
by JoelJacobson on Monday February 17, 2025 @07:26PM
(#43084631)
I tested PostgreSQL vs Neo4j with a friends-of-friends query two years ago, and to my surprise it was Neo4j that crashed, not PostgreSQL.
https://github.com/joelonsql/graph-query-benchmarks
I haven't tried the latest versions of both databases though.
Maybe I'm just not skilled enough to handle such a workload with Postgres. But Neo4j handled it easily