Neo4j缓存和性能 [英] Neo4j cache and performance

查看:610
本文介绍了Neo4j缓存和性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在neo4j中测试查询,当我清除缓存时,我看到了. Neo4j需要更多时间来加载.这意味着表演越来越多. 为什么会这样 我现在不知道是否要为每个查询清除缓存?还是应该在不清除缓存的情况下进行测试

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

推荐答案

Neo4j浏览器不缓存查询中的任何数据. 因此,清除浏览器缓存不会影响查询执行时间.

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.

要查看查询执行时间,请在查询面板上选择row结果,然后看一下底部.您应该看到类似这样的内容:Started streaming 50 records after 2 ms and completed after 12 ms. 2 ms是您的查询执行时间.

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.

如果要优化/查看查询的性能,建议您使用EXPLAINPROFILE.

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

仅供参考,Neo4j有两个缓存:

FYI, Neo4j has two caches :

  • 用于数据的->页面缓存. Neo4j将其数据文件放入RAM,因此访问速度很快
  • 用于执行查询的计划->如果您正在使用参数化查询,则Neo4j不会重新计算已存在的查询计划

欢呼

这篇关于Neo4j缓存和性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆