Hacker News new | ask | show | jobs
by zestyping 1830 days ago
I joined a small open source project that had decided to use Neo4J instead of a SQL database as its primary store. Simple queries mysteriously caused Neo4J to gobble up huge amounts of memory. Neo4J struggled even though we had fewer than a million items, sometimes getting so stuck that we had to restart the database. There wasn't any good tooling to explain why our queries were so slow. We'd already upgraded our VM beyond what we originally hoped to spend and were reluctant to spend even more on a larger one.

We had a team member who had used Neo4J professionally for years and could not figure it out. And we only had one; every other teammate and new volunteer had to be trained in a strange new way of thinking about databases and a new query syntax. Setting it up to run locally for development was a difficult process. Progress was slow and our code to access the database was messy. We kept being promised that, in exchange for these heavy burdens, Neo4J would do amazing things for us once we started doing graph queries, but we never got there because it couldn't do the basics.

We rewrote the project to run on PostgreSQL. Five tables, properly indexed, lightning fast, easy to set up and understandable by anyone. A hundred million rows and it didn't break a sweat, on the lowest tier of machine. Even graph queries were straightforward and quick.

Advice: Don't use Neo4J as your primary store, and avoid it altogether if you want volunteer or casual contributors. For us, it was all costs and no benefits.