Reputation: 2519
I must be doing something terribly wrong here. I want to retrieve all the relationship nodes with a particular label between two nodes (:User) and (:Movie). My query is
match (:User)-[r:HAS_RATED]->(:Movie) return r
I have 1 million such relationship nodes. This query takes more than 15 minutes to run on my PC (Win 7, 4GB ram but very low usage by neo4j).
Indexing the relationship nodes is not useful for this case, as the ratings and timestamps of user ratings coincide a lot, and I am not sure I need it anyway here.
How can I run this query faster? I have alotted 2GB to neo4j in the vmoptions file.
Upvotes: 0
Views: 58
Reputation: 41676
What connector / driver do you use?
It should be pretty fast, make sure you stream the data away immediately.
What do you want to do with the relationship?
see: http://neo4j.com/blog/export-csv-from-neo4j-curl-cypher-jq/
Upvotes: 1