githubEdit

Choosing Indexes

Pick the right Pinot index by query pattern, data shape, and workload.

Use this guide when you know the query shape and need a practical recommendation.

The goal is not to enable every possible index. The goal is to keep the table config aligned with the queries that matter most.

Decision guide

Query pattern or workload
Start with
Why

Equality filters such as WHERE userId = '...'

Fast point lookups and selective filtering.

IN filters over a small value set

Efficient membership testing within a segment.

Bounded numeric or time filters

Better than full scans for value intervals.

Prefix, phrase, or token search

Designed for search-style predicates.

Nested JSON predicates

Pushes JSON field filtering into the index.

Distance or containment queries

Supports spatial workloads over geographic data.

Repeated GROUP BY and aggregate queries

Pre-aggregates known query shapes.

Embedding similarity search

Supports approximate nearest-neighbor lookups.

Stable sort-key lookups

Useful when the segment sort order matches common filters.

What to check before you configure an index

  1. Verify the exact WHERE, GROUP BY, and function patterns in the query.

  2. Check whether the column is dictionary encoded, single-value, multi-value, or JSON.

  3. Confirm the index can be expressed in the current table config style.

  4. Decide whether the index must exist on new segments only or should be reloaded onto existing segments.

For table-level configuration details, use Tablearrow-up-right. For an end-to-end example that applies indexes to an ingestion pipeline, use Configure indexes.

Query validation examples

If you are validating an index choice, keep the query itself simple and representative.

Configuration style

Prefer the modern column-level configuration in fieldConfigList when the index supports it. Use legacy table-level settings only when you are maintaining an older table or following a migration path.

If you need to change an index on an existing table, confirm whether the change can be applied incrementally or whether the segments need to be reloaded.

What this page covered

This page mapped common Pinot query patterns to the indexes that usually fit them best and highlighted the checks to do before changing table config.

Next step

Open the specific index page for the workload you are tuning, then compare it with the table config and query examples for that workload.

Last updated

Was this helpful?