我有一个如下的表格
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
使用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.
因此,在此查询中使用allow filtering不会是一个坏选择。
如果在where子句上有多个过滤参数,并且非索引列是最后一个,过滤器将如何工作?请解释。