Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Neo4j use only one core in Cypher query running

Tags:

neo4j

cypher

When i run a Cypher query in UI, only one core in server is going up and the query gets stuck or responds very slow.

I use Neo4j 3.0.7 Community.

Someone have idea what i can tune for using all cores?

like image 968
Vakhtang Avatar asked Dec 28 '16 15:12

Vakhtang


People also ask

WHAT IS WITH clause in Cypher?

The WITH clause allows query parts to be chained together, piping the results from one to be used as starting points or criteria in the next. It is important to note that WITH affects variables in scope.

What does match do in Neo4j?

The MATCH clause allows you to specify the patterns Neo4j will search for in the database. This is the primary way of getting data into the current set of bindings. It is worth reading up more on the specification of the patterns themselves in Patterns.

How do I return all nodes and relationships in Neo4j?

Return all elements When you want to return all nodes, relationships and paths found in a query, you can use the * symbol.


1 Answers

A single Cypher query is limited to a single thread. See this tweet from late 2015 by Stefan Armbruster:

A cypher statement is (in most cases) one transaction and therefore only on one thread.

If your query is slow, you can use various tricks for optimizing it: this blog post is a good starting point.

like image 67
Gabor Szarnyas Avatar answered Nov 02 '22 02:11

Gabor Szarnyas