cassandra pagination: the difference between driver and CQL

女生的网名这么多〃 提交于 2020-01-15 11:44:06

问题


I am reading driver pagination in here. but CQL also support LIMIT in WHERE clause. Wonder what is the difference between these two


回答1:


Pagination is how much you of your result you work with at a time.

WHERE and LIMIT are about what is in your result.

Imagine you request all rows where X < 100. This may refer to 1 million different rows. If the client or the server requested all of this at once it would cause a lot of resource pressure. To avoid this the driver is capable of asking for just a few rows at a time. This allows the client and the server to work with a stream of items rather than allocating space for everything up front.



来源:https://stackoverflow.com/questions/42102279/cassandra-pagination-the-difference-between-driver-and-cql

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