del bao
del bao

Reputation: 1174

cassandra pagination: the difference between driver and CQL

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

Upvotes: 1

Views: 349

Answers (1)

RussS
RussS

Reputation: 16576

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.

Upvotes: 3

Related Questions