【发布时间】:2017-07-23 09:43:53
【问题描述】:
我有一张如下表
CREATE TABLE test (
day int,
id varchar,
start int,
action varchar,
PRIMARY KEY((day),start,id)
);
我想运行这个查询
Select * from test where day=1 and start > 1475485412 and start < 1485785654
and action='accept' ALLOW FILTERING
这允许过滤有效吗?
我希望 cassandra 会按此顺序过滤
1. By Partitioning column(day)
2. By the range column(start) on the 1's result
3. By action column on 2's result.
因此,允许过滤不会是此查询的错误选择。
如果where子句上有多个过滤参数并且非索引列是最后一个,过滤器将如何工作? 请解释一下。
【问题讨论】:
-
This video from datastax academcy 对这个话题真的很有帮助
标签: cassandra datastax cql datastax-enterprise