Neo4j cache and performance

倖福魔咒の 提交于 2020-01-17 08:42:20

问题


I'm testing a query in neo4j and I see that when I clear the cache . Neo4j takes more time to load . which mean performances are dicreasing . Why is this happening I don't know now whether to clear the cache for each query ? or should I just test without clearing the cache


回答1:


Neo4j browser doesn't cache any data from a query. So clearing your browser cache has no incidence on the query execution time.

Perhaps the browser is creating a new connection to the database, makes some computations (like colors for nodes for example), etc.

To see the query execution time, on the query panel, select the row result, and take a look at the bottom. You should see something like that : Started streaming 50 records after 2 ms and completed after 12 ms. The 2 ms is your query execution time.

If you want to optimize / see the performance of a query, I recommend you to use the EXPLAIN and PROFILE.

FYI, Neo4j has two caches :

  • the one for the data -> pagecache. Neo4j put in RAM its data files, so to access them is fast
  • the one for query execution plan -> if you are using parameterised queries, Neo4j doesn't re-computing the query plan if it already has it

Cheers



来源:https://stackoverflow.com/questions/44564878/neo4j-cache-and-performance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!