Hector's IndexedSlicesQuery has a setRowCount method that you can use to page through the results, as described in https://github.com/rantav/hector/wiki/User-Guide .

     rangeSlicesQuery.setRowCount(1001);
      .....
     rangeSlicesQuery.setKeys(lastRow.getKey(),  "");

Is it efficient? Specifically, suppose my query returns 100,000 results and I page through batches of 1000 at a time (making 100 executes of the query). Will it internally retrieve all the results each time (but pass only the desired set of 1000 or so to me)? Or will it optimize queries to avoid the duplication? I presume the latter. :)

Can IndexedSlicesQuery's setStartKey method be used for the same effect?

   Thanks,  Don

Reply via email to