Skip to content

Sorted index on a non-dictionary-encoded column results in full segment scan  #9770

@nizarhejazi

Description

@nizarhejazi

Defining a sorted index on a non-dictionary-encoded column causes Pinot to fully scan the content of segments (no inverted index is utilized).

user table config:

      "noDictionaryColumns": [
        "id",
      ],
      "sortedColumn": [
        "id"
      ],

Example query:
EXPLAIN PLAN FOR select id, "home.state" from user where id IN ('some_id')

Output:
image

Created another user table with a sorted index defined over id which is dictionary-encoded.

user_id_dict_encoded table config:

      "noDictionaryColumns": [
      ],
      "sortedColumn": [
        "id"
      ],

Example query:
EXPLAIN PLAN FOR select id, "home.state" from user_id_dict_encoded where id IN ('some_id')

Output:
image

@mayankshriv found the root cause of the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions