3 ms·
I had almost exactly the opposite experience, although my dataset was pretty small. We wanted to store a graph in postgres and ended up writing some recursive
by henryfjordan 2y ago
I had almost exactly the opposite experience, although my dataset was pretty small.
We wanted to store a graph in postgres and ended up writing some recursive queries to pull subgraphs then had NetworkX layered over it to do some more complex graph operations. We ended up doing that for a short while but then switched to Neo4j because of how comparatively easy it was to write queries (although the Python support for Neo4j was severely lacking). Never really stressed it out on dataset size though.
I did manage to crash Redis' graph plugin pretty quickly when I was testing that.
- SahAssar 2y agoNot sure what you consider "quite small" and I don't know how NetworkX works, but postgresql recursive queries have worked well for me for small graphs. Could you share what the data structure and scale was?
- henryfjordan 2y agoWe basically had a single table that we wanted to be able to nest on itself arbitrarily. Think categories and subcategories, maybe 100k nodes/rows Postgres worked fine but cypher is so much more expressive and handles stuff like loop detection for you, neo4j was much easier to work with. Performance wasn't ever really an issue with either.
- AlphaSite 2y agoWe have something similar in Postgres but IMO disconnectedness also plays a really big part in this whole calculation. We actually ended up just changing the transitive closure for fast operations (and simpler code).
- zozbot234 2y agoNote that more recent versions of Postgres have added support for the CYCLE keyword, for easier loop detection.