APOC parallelise a simple MATCH(n) RETURN n

I have the simplest cypher ever:


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?

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.

1 Like

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 :slight_smile:

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")