Jimmy,

On 01.10.2013, at 17:26, Jimmy Lin <y2klyf+w...@gmail.com> wrote:

> i have a table like the following:
>  
> CREATE TABLE log (
> mykey timeuuid,
> type text,
> msg text,
> primary key(mykey, type)
> );
>  
> I want to page through all the results from the table using

Have you considered the new build-in paging support:

http://www.datastax.com/dev/blog/client-side-improvements-in-cassandra-2-0

Jan

>  
> select * from log where token(mykey) > token(maxTimeuuid(xxxxx)) limit 100;
>  


> (where xxx is 0 for the first query, and next one to be the time of the 
> mykey(timeuuid) from the last query result)
>  
> But i seem to get random result.
>  
> #1
> is the above logic make sense for timeuuid type pagination?
>  
> #2
> when we use token in the where clase, is the result return sorted?
> e.g
> where token(k) > token(4) AND token(k)  < token(10) limit 3
>  
> k=5, k=6, k=7
> or
> k=7, k=5, k=9
>  
> ?
> 
> I see lot of article use LIMIT to achieve page size, but if the result is not 
> sorted, then it is possible to miss item?
>  
>  
> thanks
>  
>  

Reply via email to