I would respectfully disagree that it doesn't necessarily represent production usage, since in some cases, each query/traversal will be unique and isolated to a part of a subgraph, so in some cases, a "cold" query may be the norm....
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Michael Hunger Sent: Wednesday, June 15, 2011 10:25 AM To: Neo4j user discussions Subject: Re: [Neo4j] Slow Traversals on Nodes with too many Relationships That is rather a case of warming up your caches. Determining the traversal speed from the first run is not a good benchmark as it doesn't represent production usage :) The same (warming up) is true for all kinds of benchmarks (except for startup performance benchmarks). Cheers Michael Am 15.06.2011 um 14:48 schrieb Agelos Pikoulas: > I have a few "Part" nodes related with each via "HASPART" > relationship/edges. > (eg Part1---HASPART--->Part2---HASPART--->Part3 etc) . > TraversalDescription works fine, following each Part's outgoing HASPART > relationship. > > Then I add a large number (say 100.000) of "Container" Nodes, where each > "Container" has a "CONTAINS" relation to almost *every* "Part" node. > Hence each Part node now has a 100.000 incoming CONTAINS relationships from > Container nodes, > but only a few outgoing HASPART relationships to other Part nodes. > > Now my previous TraversalDescription run extremely slow (several seconds > inside each Iterator<Path>.next() call) > Note that I do define relationships(RT.HASPART, Direction.OUTGOING) on the > TraversalDescription, > but it seems its not used by neo4j as a hint. Note that on a subsequent run > of the same Traversal, its very quick indeed. > > Is there any way to use Indexing on relationships for such a scenario, to > boost things up ? > > Ideally, the Traversal framework could use automatic/declerative indexing on > Node Relationship types and/or direction to perform such traversals quicker. > > Regards > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

