time curl -o result.json -d'{"statements":[{"statement":"match (n) return id(n)"}]}' -H accept:application/json -H content-type:application/json http://localhost:7474/db/data/transaction/commit
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1552k 0 1552k 100 55 1708k 60 --:--:-- --:--:-- --:--:-- 1707k
real 0m0.915s
user 0m0.153s
sys 0m0.409s
wuqour:neo4j-enterprise-2.0.1 mh$ ls -lh result.json
-rw-r--r-- 1 mh staff 1,5M 24 Mär 23:24 result.json
--
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 neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
Given any two persons chosen at random, is there a path that connects them that is at most five relationships long? For a social network containing 1,000,000 people, each with approximately 50 friends, the results strongly suggest that graph databases are the best choice for connected data. And graph database can still work 150 times faster than relational database at third degree and 1000 times faster at fourth degre
MATCH (U:User) RETURN COUNT(U);
MATCH (U:User)-[F:Friend]->(FU:User)-[FF:Friend]->(FFU:User)
WHERE U.user_id=1 AND FFU.user_id<>U.user_id AND NOT (U)-[:Friend]->(FFU)
RETURN FFU.username
cypher 2.0 foreach (i in range(1,1000) | create (:User {id:i}));
create constraint on (u:User) assert u.id is unique;
match (u1:User),(u2:User) with u1,u2 where rand() < 0.1 create (u1)-[:Friend]->(u2);
Relationships created: 99974
778 ms
910 rows
101 ms
but even your query takes only
MATCH (U:User)-[F:Friend]->(FU:User)-[FF:Friend]->(FFU:User)
WHERE U.id=1 AND FFU.id<>U.id AND NOT (U)-[:Friend]->(FFU)
RETURN FFU.id;
...
8188 rows
578 ms