Fetch data from set with limit or size


#1

Is there any option to fetch data with limit or size from set. which can be helpful to implement pagination. like to pass offset and size in sql.


#2

“ScanPolicy.scanPercent” will roughly limit scan data. Pagination is not really viable for a number of reasons.

  1. The server does not accept an “offset”.

  2. Server nodes return data at random times when nodes are scanned in parallel (default). Nodes can be scanned in series by setting “ScanPolicy.maxConcurrentNodes = 1”

  3. A single server node can still return data at random if data migrations are occurring.


#3

thanks, will server return result list in same order each time?


#4

If migrations (data shifted among server nodes) have occurred, then the order will not be the same. Migrations typically happen when nodes are added or removed from the cluster.