Skip to content

sql: support lookup joins on secondary indexes #25431

@petermattis

Description

@petermattis

Lookup joins are currently only supported when the right side of the join (the lookup side) is for the primary index. Supporting secondary index lookup joins requires an extra level of lookup (if the secondary index doesn't cover the columns in the query): first level lookup finds the primary key and the second level lookup reads the row. We have at least one user with a query which can benefit from this. The workaround is to perform the join "in the application", which is unsatisfactory.

If adding support for lookup joins on secondary indexes is not too intrusive, we should consider backporting this to 2.0.x.

Metadata

Metadata

Assignees

Labels

A-sql-executionRelating to SQL execution.C-performancePerf of queries or internals. Solution not expected to change functional behavior.O-supportWould prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions