SELECT 范围来自 Cassandra 中的地图
SELECT range from Map in Cassandra
我在 Cassandra 中有 table,我希望从 usermgmt.user_history.history
select 最后 blob
10
CREATE TABLE usermgmt.user_history (
id uuid,
history Map<timeuuid, blob>,
PRIMARY KEY(id)
);
我觉得使用带有有序类型列名的 5 年前的 Cassandra 设计很容易。但是现在我找不到 select 最近 Cassandra 3.0
中最后 10 个条目范围的方法
这个怎么样:
CREATE TABLE usermgmt.user_history (
id uuid,
history_time timestamp,
history_blob blob,
PRIMARY KEY(id, history_time)
);
然后,
SELECT * FROM usermgmt.user_history WHERE id = your-uuid ORDER BY history_time limit 10;
我在 Cassandra 中有 table,我希望从 usermgmt.user_history.history
blob
10
CREATE TABLE usermgmt.user_history (
id uuid,
history Map<timeuuid, blob>,
PRIMARY KEY(id)
);
我觉得使用带有有序类型列名的 5 年前的 Cassandra 设计很容易。但是现在我找不到 select 最近 Cassandra 3.0
中最后 10 个条目范围的方法这个怎么样:
CREATE TABLE usermgmt.user_history (
id uuid,
history_time timestamp,
history_blob blob,
PRIMARY KEY(id, history_time)
);
然后,
SELECT * FROM usermgmt.user_history WHERE id = your-uuid ORDER BY history_time limit 10;