I have some Cassandra related questions:
I have to store some data (about 10M rows) (let's say a natural key - sortable, update timestamp, createDate (YYYYMMDD only) and a value field. I plan to create the following CF
CREATE TABLE data (
id text,
createdate text,
updatedate timeuuid,
value text,
PRIMARY KEY (id, updatedate)
);
CREATE TABLE data_createdate (
id text,
createdate text,
value text,
PRIMARY KEY (id, createdate)
);
My usage query will be like:
- get all rows (id, value, createdate, updatedate), so CQL like this will do
SELECT * FROM data
I am using Astyanax, how do I do paging? Do I have to enable partitioner as order-preserved, so I can use token(id)
in a range value to page through.
- get all rows with a updatedate range, so CQL like this will do
SELECT * FROM data where updatedate > startdate and updatedate < enddate
Again, how do I do paging?
- get all rows with a createdate range, it's similar to the above question, but I can run CQL against
data_createdate
CF. Again, how do I do paging?
Any suggest and comments? Thanks a lot.