cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jimmy Lin <>
Subject paging through a table with timeuuid primary key
Date Tue, 01 Oct 2013 15:26:25 GMT
i have a table like the following:

mykey timeuuid,
type text,
msg text,
primary key(mykey, type)

I want to page through all the results from the table using

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.

is the above logic make sense for timeuuid type pagination?

when we use token in the where clase, is the result return sorted?
where token(k) > token(4) AND token(k)  < token(10) limit 3

k=5, k=6, k=7
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?


View raw message