Hello team! I had a quick question if query plan s...
# general
s
Hello team! I had a quick question if query plan shows
FILTER_SORTED_INDEX
would it be the same as using
FILTER_INVERTED_INDEX
like sorted inverted index?
m
No, one is using the sorted column, the other is using the inv index.
r
@Soon Are you asking about which index would perform best for your use case?
s
Thank you for the follow up! Based on the doc (https://docs.pinot.apache.org/basics/indexing/inverted-index?q=segment+configuration&global=true#sorted-inverted-index:~:[…]n%20suggests%20otherwise) seems like sorted inverted index is enabled without any configuration if the column is sorted and it is a dictionary index. I have enabled the column to be sorted and dictionary, but I'm seeing that it is using
FILTER_SORTED_INDEX
instead of
FILTER_INVERTED_INDEX
and wanted to see if this would be already using inverted index behind the scene.
m
Yes sorted column storage duals as forward and inverted index
Sorted is typically better because of locality
thanks 1
x
If column is already sorted then pinot won't create inverted index and always use sorted index