问题
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