Hello,

Prompted by a recent SO question on establishing "partitions" in graphs, I 
ran a tiny little experiment to compare the use of "lookup nodes" with the 
use of labels from a performance perspective.    I'd appreciate feedback if 
someone has a moment:

https://gist.github.com/moxious/10888550

The setup for this is as follows:

In previous versions of neo4j, people have used an "lookup node" pattern to 
access certain subgraphs or subsets of their data. The "lookup node" 
pattern basically creates a single node to act as the entry of an index, 
and relationships from that "lookup node" to whatever the contents of the 
index would be.   Labels provide an alternative that for some use cases 
could obviate the need for introducing "lookup nodes".   

The experiment basically tries to consider two questions: first, which in 
general performs better, and second, what are the modeling implications of 
using one versus the other?   My (tentative) conclusions are that using 
labels rather than lookup nodes is a lot faster, but that there are some 
modeling drawbacks to the use of labels.

Much more broadly, I'm interested in finding/developing better modeling 
expertise on how to model complex domains as graphs.  Kind of like Michael 
Hunger's talk here (http://www.neo4j.org/develop/modeling) but in much more 
depth, and with more information on tradeoffs.  (E.g. when is it better to 
model something as a node property vs. a relationship?)

Thanks,
David

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to