Why would you want to return all nodes in the first place?
If you really want to do that, use the transactional http endpoint and curl
that streams the response:
I tested it with a db of 100k nodes, it takes 0.9 seconds to transfer them
(1.5MB) over the wire
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
If you transfer all their properties by using "return n", it takes 1.4
seconds and results in 4.1MB transferred.
If you just want to know how many nodes are in your db. use something like
this instead:
match (n) return count(*);
+----------+
| count(*) |
+----------+
| 100052 |
+----------+
1 row
186 ms
On Mon, Mar 24, 2014 at 8:46 PM, Javad Karabi <[email protected]> wrote:
> make sure you are setting up your indexes.
> this was something that i did not do at first, but once i realized how
> important it was, my queries were incredibly fast.
> also, profile your queries by prepending "profile " to the query, and try
> to decrease _db_hits.
>
> if you can provide the output of "profile ...", that would be awesome.
>
>
> On Monday, March 24, 2014 12:03:58 PM UTC-5, Rio Eduardo wrote:
>>
>> I'm testing my thesis which is about transforming from relational
>> database to graph database. After transforming from relational database to
>> graph database, I will test their own performance according to query
>> response time and throughput. In relational database, I use MySQL while in
>> graph database I use Neo4j for testing. I will have 3 Million more nodes
>> and 6 Million more relationships. But when I just added 60000 nodes, my
>> Neo4j is already dead. When I tried to return all 60000 nodes, it returned
>> unknown. I did the same to MySQL, I added 60000 records but it could return
>> all 60000 records. It's weird because it's against the papers I read that
>> told me graph database is faster than relational database So Why is Neo4j
>> slower(totally dead) in lower specification of pc/notebook while MySQL is
>> not? And What specification of pc/notebook do I should use to give the best
>> performance during testing with millions of nodes and relationships?
>>
>> Thank you.
>>
> --
> 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.
>
--
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.