【发布时间】:2019-08-12 06:46:58
【问题描述】:
我在 cassandra 中有这个架构:
create table if not exists
converstation_events(
timestamp timestamp,
sender_id bigint,
conversation_id bigint,
message_type varchar,
message text,
primary key ((conversation_id), sender_id, message_type, timestamp));
还有一个值为conversation_ended 的message_type,有没有办法对数据进行非规范化,以便我可以对那些已经结束的对话进行查询?
我考虑过有一个额外的字段,可以在会话结束消息到达系统时由触发器更新,这有意义吗?
【问题讨论】:
标签: cassandra data-modeling cqlsh