With Cassandra 2.0.x and Java driver 2.0.0 you can set the fetch size on the query and then use Resulset.iterator(). It will iterate over your data set by loading batches of size = fetch size Le 18 mars 2014 01:39, "Philip G" <g...@gpcentre.net> a écrit :
> Thanks for the links. > > As I'm messing around with CQL, I'm realizing Cassandra isn't going to do > what I need. Quite simply, here's a basic layout of my table: > > myTable ( > visit_dt timestamp, > cid ascii, > company text, > // ... other stuff > primary key (visit_dt, cid) > ); > index on (company) > > My query starts off with visit_dt IN ('2014-01-17'). In Cassandra, I > essentially get back just 1 wide row (but shows as many within CQL3). I can > filter that via AND company='my company' due to the index. However, if I > LIMIT 10; there isn't a way to get "the next 10" records as token() only > works on the partition key, and each row has the same partition key. > > Or am I missing something? Is there a way I've not discovered to get "the > next 10" on a single wide row? > > > --- > Philip > g...@gpcentre.net > http://www.gpcentre.net/ > > > On Mon, Mar 17, 2014 at 5:12 PM, Tupshin Harper <tups...@tupshin.com>wrote: > >> Read the automatic paging portion of this post : >> http://www.datastax.com/dev/blog/client-side-improvements-in-cassandra-2-0 >> On Mar 17, 2014 8:09 PM, "Philip G" <g...@gpcentre.net> wrote: >> >>> On Mon, Mar 17, 2014 at 4:54 PM, Robert Coli <rc...@eventbrite.com>wrote: >>> >>>> The form of your question suggests you are Doing It Wrong, FWIW. >>>> >>> >>> >>> Okay, let me ask different question: how do you go about data browsing >>> in a CQL3 table? Especially in situations were a single query could return >>> a couple thousand records, and we want to limit it by a 100 at a time. >>> >>> Please, feel free to point me in the right direction, if necessary. I >>> admit I'm still figuring out Cassandra/CQL. But my knowledge has been >>> exponentially expanding on a daily basis. I want to understand this more, >>> and possible solution to problems I'm running into migrating from a RDBMS >>> (mssql) to Cassandra. I've figured out a lot of stuff, but have not quite >>> resolved this use-case. >>> >>> Thanks, >>> >>> --- >>> Philip >>> g...@gpcentre.net >>> http://www.gpcentre.net/ >>> >> >