cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

APOC parallelise a simple MATCH(n) RETURN n

anthino12
Node Clone

I have the simplest cypher ever:

MATCH(n)
RETURN n

But this cypher returns 1 million data and it takes too long (sometimes it doesn't even finish, the app just crashes). I read that I can use apoc.cypher.parallel for better performance but it throws an error and I can't use it. After running apoc.cypher.parallel("MATCH(n) RETURN n") I get the error:

Invalid input 'p': expected 'l/L' (line 1, column 2 (offset: 1))
"apoc.cypher.parallel("MATCH(n) RETURN n")"
  ^

Is there a way to fix this error or more importantly, is there a way to parallelise the query on the other way?

5 REPLIES 5

Hi @anthino12,
May I ask what is it that you want to achieve? MATCH (n) RETURN n is going to return all the data you have in your graph.

Correct. The data I'm trying to return is very big (approx. 1 million of nodes) and I can't return it. The app crashes so I assume that having it parallelised, I can have the data faster(?)

I see, and by app you mean Neo4j Browser?

Hello @anthino12

I think there is a syntax error, you must add a CALL front of your cypher request:

CALL apoc.cypher.parallel("MATCH(n) RETURN n")

Regards,
Cobra

Hello @anthino12
Did you eventually find the solution for this?

Thanks,
Richard