[Neo] How to efficiently query in Neo4J?

Max De Marzi Jr. maxdemarzi at gmail.com
Thu Apr 8 23:48:18 CEST 2010

You know this is something that I think needs to be made clear... using just
the graph is not the right way to go unless you have a very special

I was trying to traverse over cities/people/jobs/skills and they were taking
a while (as in 10-15 seconds).
Then I did it sqlserver... less than 1 second.  I tried running ALL users
through it.. 2 minutes vs god knows how long for doing a traversal for each
user (400k users).

Some things are better not done in the graph.  So I decided to keep that in
tables, and just move the "person relationships" to the graph (works with,
manages, knows, friends, etc).

I treat the graph like a specialized index.
Makes a lot more sense now, and I get the best of both worlds.

On Thu, Apr 8, 2010 at 4:35 PM, Michael Ludwig <milu71 at gmx.de> wrote:

> Alastair James schrieb am 07.04.2010 um 15:53:50 (+0100)
> [[Neo] How to efficiently query in Neo4J?]:
> > Briefly, the site consists of posts, each tagged with various
> > attributes, e.g. (its a travel site) location, theme, cost etc... Also
> > the tags are hierarchical. So, for location we have (say) 'tuscany'
> > inside 'italy' inside 'europe'. For theme we have (say) 'cycling'
> > inside 'activity'.
> After giving this some thought, it looks to me as if there is nothing
> particularly graphy in your example. I know, most everything is a graph,
> but here the data is more regular: Your hierarchical catalog of tags
> immediately made me think of Joe Celko's nested sets, which is a very
> efficient way to represent trees in terms of sets, as found in SQL
> databases. (Heresy again, I know, but well.) And the relationship of
> posts to tags is simply N-M, and that's it.
> There aren't any real links (edges) between posts, which arguably would
> make your data model more graphy. In your model, related posts are
> related by virtue of their attributes (they share some tags, or are
> posted by the same user), and not eis ipsis. So I'd say there is not
> much in the way of graphiness.
> --
> Michael Ludwig
> _______________________________________________
> Neo mailing list
> User at lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user

More information about the User mailing list