【发布时间】:2020-08-27 09:33:12
【问题描述】:
CREATE TABLE feed (
identifier text,
post_id int,
score int,
reason text,
timestamp timeuuid,
PRIMARY KEY ((identifier, post_id), score, id, timestamp)
) WITH CLUSTERING ORDER BY (score DESC, timestamp DESC);
CREATE INDEX IF NOT EXISTS index_identifier ON feed ( identifier );
我想运行where identifier = 'user_5' and post_id = 11; 和where identifier = 'user_5'; 两种类型的查询
我想为每个查询分页 10 个结果。但是,很少有查询可以具有可变的结果计数。最好有类似 *column* > last_record 的东西我可以使用。
请帮忙。提前致谢。
P.S:Cassandra 版本 - 3.11.6
【问题讨论】:
标签: cassandra pagination nosql cassandra-3.0