Skip to content

Graph sources: selectDistinct ?s … LIMIT n reads far more than it returns #2223

Open

Description

@aaj3f

selectDistinct ?s LIMIT 25 over an R2RML graph source is 25–50× slower than select ?s LIMIT 25, because DISTINCT correctly swallows the LIMIT's row budget. DISTINCT can't be skipped: R2RML declares no keys, and Iceberg identifier fields aren't enforced. A soft row-size hint (scan in growing windows until n distinct rows are found) would recover most of it without changing results.

Follow-up from the review of #2199.

Activity

  1. added
    P3
    area:query
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3area:query

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions