phoenix连接不使用索引提示的表

时间:2018-03-05 01:51:07

标签: hadoop hbase phoenix

当使用phoenix二级索引,并查询非主要,非索引,非覆盖字段时,提示在连接表时不起作用。

这是索引

CREATE INDEX my_index ON table_1 (f1, f2);

这适用于索引:

select /*+ INDEX(table_1 my_index) */ f1, f2, f3 from table_1;

这不适用于索引:

select /*+ INDEX(table_1 my_index) */ a.f1, a.f2, a.f3, b.f4 from table_1 a
join table_2 b on a.f1=b.f1
where a.f1=? and a.f2=?
limit 10;

因此,将f3添加到covered field是唯一的解决方案吗?

0 个答案:

没有答案