What is the fastest way to get all unordered nodes and relationships from a running Neo4j 2.x server into a program?
Cypher MATCH n RETURN n
is too slow for my use case (say we have >10M nodes to extract).
The shell command dump
seems interesting but it requires some hack to call from a source code. Are there any benchmark available of dump
?
Any advices appreciated!
--EDIT--
I execute the query thought the REST endpoint of a local Neo4j server (thus no network effect) with a query like MATCH n RETURN n SKPI 0 LIMIT 50000
. My db is Neo4j 2.0.3 populated with 100k nodes of 1 integer property and no relationship. Computer: SSD with read speed 1.3+ Mo/s and CPU i7 1.6Ghz, JVM -Xmx2g. It takes ~4s to retreive 50k nodes:
curl -s -w %{time_total} -d"query=match n return n limit 50000" -D- -onul: http://localhost:7474/db/data/cypher
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Access-Control-Allow-Origin: *
Content-Length: 63394503
Server: Jetty(9.0.z-SNAPSHOT)
4,047