我想用卡桑德拉保存日志,并在以后读麻烦造型卡桑德拉表
以下是我迄今所做的:
CREATE TABLE logs
(
id uuid,
type int,
start_date timestamp,
end_date timestamp,
ip text,
log_event text,
user_id text,
user_agent text,
PRIMARY KEY (id, type, start_date, user_id)
) WITH CLUSTERING ORDER BY (type ASC, start_date DESC, profil_token ASC);
我需要总是这种查询:
SELECT * FROM logs WHERE type = 1 AND user_id = 'test' AND start_date = '2017-03-08';
我需要不进行身份查询,但我不能,因为ID是我真正的主键
我不明白如何实现这种查询没有允许过滤
有了'ALLOW FILTERING',他不会活过来读取超时... – xmas79
非常感谢你,你指着我正确的方向 – Bouki