Hi folks, does anyone know what's the order in whi...
# general
a
Hi folks, does anyone know what's the order in which indices are checked for a query? Say I have a query like the following:
Copy code
select * from table where col1 >= 10 and col2 = 'foo' and col3 = 'bar' and col4 < 20
Assuming col1, col4 have range indices and col2, col3 have inverted indices. Would the indices be picked based on the order of the filter conditions?
@Jackie ^^
j
It doesn’t really matter because we will evaluate all of them
Scan is processed in the end if required
m
But for
and
don’t we evaluate in prioritized manner so that the output of more efficient filtering is fed into the next predicate?
j
For index backed by bitmap, we will evaluate them and do and operation on all bitmaps
🌟 1
r
the range index could support pushing bitmaps down in to the filter, which would make the range filters faster when there's a (selective) inverted index present
RangeBitmap
has overloads which take a
RoaringBitmap
'context' to represent prior filtering state, but it's obviously not used because Pinot doesn't thread filtering context between operators