倒排索引部分场景失效

Viewed 102

v2.1.6

对表中 A(int),B(varchar) 字段添加倒排索引

-- 可以命中倒排索引 (RowsInvertedIndexFiltered > 0)
select * from table where A in (123) or B in ('xxx') 
select * from table where A in (123) or B in ('xxx', 'yyy')
select * from table where A in (123, 456)
select * from table where B in ('xxx', 'yyy')


-- 无法命中倒排索引 (RowsInvertedIndexFiltered = 0)
select * from table where A in (123, 456) or B in ('xxx') 
select * from table where A in (123, 456) or B in ('xxx', 'yyy') 

经测试 如果A和B都为varchar类型,则上述问题不存在

1 Answers

需要补齐下table的表结构,以及无法命中的执行计划和RowsInvertedIndexFiltered部分profile这边看看的,谢谢