如何用密码分页查询结果? [英] How to paginate query results with cypher?

查看:66
本文介绍了如何用密码分页查询结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以对密码查询进行分页.例如,产品列表,但是我不想显示/检索/缓存所有结果,因为我可以得到很多结果.

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

推荐答案

SKIPLIMIT的组合确实是可行的方法.不可避免地使用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屋!

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