Hacker News new | ask | show | jobs
by suprememoocow 3276 days ago
The big problem with the way we use neo4j is around huge rooms with ~100K users. The number of possible rooms that neo4j has to traverse (even a shallow traversal) for a user in a big room is huge.

Thanks for your recommendations. I'll definitely check them out.

1 comments

Those huge rooms really don't add anything to recommendations (like everyone buys milk), if almost everyone is in the room you can also just leave it off (the same is true for rooms with very few users).

That's why in recommendations, I usually filter them out b degree (which is a constant value read).

MATCH (r:Room) WHERE size( (r)<-[:MEMBER]-() ) < 5000) ...

You're also not using directions in your queries, which will also help.

I looked at your other queries, they can also be improved easily, if you want to I can help you do that. Just need some sample data or a read-only access to the db. Just ping me at michael@neo4j.com.