An internal implementation would be probably faster. If timing is that critical for you, you can have a look in EmbeddedGraphDbImpl.getAllNodes() and implement a similar solution for relationships.
Cheers Michael Am 23.07.2011 um 04:20 schrieb John cyuczieekc: > Hey Jim, > I am sort of glad to hear that, maybe in the future I could see a method > like getAllRelationships(), or not, np :) > Yes, using Michael's code works, but ... > total relations count=100,011 timedelta=3,075,897,991 ns > it kind of takes 3 seconds (when not cached) to count 100k relationships > (considering there are 100k+2 unique nodes too) > when cached: > total relations count=100,011 timedelta=154,673,763 ns > > Still, it's pretty fast, but I have to wonder if it would be faster if using > relationships directly :) > > Either way, wish y'all a great day! > > > On Sat, Jul 23, 2011 at 3:57 AM, Jim Webber <j...@neotechnology.com> wrote: > >> Hi John, >> >> Relationships are stored in a different store than nodes. This enables >> Neo4j to manage lifecycle events (like caching) for nodes and relationships >> separately. >> >> Neo4j really is a graph DB, not a triple store masquerading as a graph DB. >> >> Nonetheless, that code Michael sent still works :-) >> >> Jim >> _______________________________________________ >> Neo4j mailing list >> User@lists.neo4j.org >> https://lists.neo4j.org/mailman/listinfo/user >> > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user