简体   繁体   English

LIMIT是否会影响neo4j密码查询性能?

[英]Does LIMIT affect neo4j cipher query performance?

Currently I have a query like this: 目前,我有这样的查询:

var query = [
    'MATCH (term:Term)',
    'WHERE HAS (term.last_viewed_at)',
    'RETURN term ORDER BY term.last_viewed_at DESC LIMIT 17',
].join('\n');

Would the performance of the query be improved if I change the LIMIT 17 to something smaller/bigger, or to remove the LIMIT 17 and filter the result on my own? 如果将LIMIT 17更改为较小/较大的值,或者删除LIMIT 17并自行过滤结果,查询的性能是否会得到改善?

Or are there other ways to improve the performance of this query? 还是有其他方法可以改善此查询的性能?

How much higher will your LIMIT be, how much higher DbHits will be done during the Execution Plan, and removing the LIMIT will have as much DBHits than returned Nodes. 您的LIMIT将提高多少,在执行计划期间将完成多少DbHits,并且删除LIMIT将具有与返回的节点一样多的DBHits。

You can have a nice explanation of the Execution Plan with a little sandbox here : 您可以在这里通过一个小沙箱对执行计划进行很好的解释:

http://www.kennybastani.com/2014/07/understanding-how-neo4j-cypher-queries.html http://www.kennybastani.com/2014/07/understanding-how-neo4j-cypher-queries.html

Cheers, 干杯,

Chris 克里斯

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM