Apache Pinot Docs
Search…
Range Index
Range indexing allows you to get better performance for queries that involve filtering over a range.
It would be useful for a query like the following:
1
SELECT COUNT(*)
2
FROM baseballStats
3
WHERE hits > 11
Copied!
A range index is a variant of an inverted index, where instead of creating a mapping from values to columns, we create mapping of a range of values to columns. You can use the range index by setting the following config in the table config.
1
{
2
"tableIndexConfig": {
3
"rangeIndexColumns": [
4
"column_name",
5
...
6
],
7
...
8
}
9
}
Copied!
Range index is supported for both dictionary as well as raw encoded columns.

When to use Range Index?

A good thumb rule is to use a range index when you want to apply range predicates on metric columns that have a very large number of unique values.
Using an inverted index for such columns will create a very large index that is inefficient in terms of storage and performance.
Copy link