incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Smith <dsm...@likewise.com>
Subject Efficiency of hector's setRowCount
Date Mon, 10 Oct 2011 22:52:55 GMT
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

Mime
View raw message