如何用密码分页查询结果? [英] How to paginate query results with cypher?
问题描述
是否可以对密码查询进行分页.例如,产品列表,但是我不想显示/检索/缓存所有结果,因为我可以得到很多结果.
Is it possible to have cypher query paginated. For instance, a list of products, but I don't want to display/retrieve/cache all the results as i can have a lot of results.
我正在寻找类似于SQL中的偏移量/限制的内容.
I'm looking for something similar to the offset / limit in SQL.
密码跳过+限制+排序是一个好的选择吗? http://docs.neo4j.org/chunked/stable/query-skip.html
Is cypher skip + limit + orderby a good option ? http://docs.neo4j.org/chunked/stable/query-skip.html
推荐答案
SKIP
和LIMIT
的组合确实是可行的方法.不可避免地使用ORDER BY
可使密码扫描与查询相关的每个节点.使用WHERE
子句也是一样.性能应该不会那么差.
SKIP
and LIMIT
combined is indeed the way to go. Using ORDER BY
inevitably makes cypher scan every node that is relevant to your query. Same thing for using a WHERE
clause. Performance should not be that bad though.
这篇关于如何用密码分页查询结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!