Jaime Roman
Jaime Roman

Reputation: 989

How to know visited nodes in Neo4j

After reading Stefan's post: https://neo4j.com/blog/dark-side-neo4j-worst-practices/ where he says that if the country becomes a node it is more efficient because the friends who do not live are not visited in the UK

how to know which nodes are visited when we make a query cypher in neo4j?, is there any form like a summary or debug that indicates at the end of the query: 50 nodes visited, 60 MB memory, etc.?

Upvotes: 0

Views: 76

Answers (1)

InverseFalcon
InverseFalcon

Reputation: 30397

You can PROFILE a query to see the query plan, which includes db hits (abstract units of db work) as well as the number of rows that flow between cypher operations (operations produce rows of results...and operations execute per input row).

If you have Neo4j Enterprise, you can enable query logging, which you can configure to produce metrics on executed queries that exceed a specified execution time. The metrics may include time spent planning, executing, and waiting (such as on locks), as well as page hits and misses, and memory allocated (though not necessarily held to completion) throughout the execution of the query.

Upvotes: 2

Related Questions