How to scan a table if i have table like this in Cassandra 3.11:
CREATE TABLE versions (
root text,
subroot text,
key text,
ts timeuuid,
size bigint,
PRIMARY KEY ((root, subroot, key), ts)
) WITH CLUSTERING ORDER BY (ts DESC)
how can I scan properly per 1000 only for root='a', subroot='b', key>='c000000' and key<'c000001' (I need to scan everything started with c000000*, for example c000000-aaaaaa, c000000something, etc)
Because if I do this using sum, it got timedout
SELECT sum(size)
FROM versions
WHERE root='a'
AND subroot='b'
AND key>='c00000' AND key<'c000001'
ALLOW FILTERING;
Is there a way to fetch everything without ALLOW FILTERING (I can sum using golang code or other language)?