Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql/analyzer/indexed_joins.go: Use partial indexes for indexed joins when a full index isn't available. #325

Merged
merged 2 commits into from Mar 2, 2021

Conversation

reltuk
Copy link
Contributor

@reltuk reltuk commented Mar 2, 2021

No description provided.

@reltuk reltuk requested a review from zachmu March 2, 2021 04:35
Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

idx := ia.IndexByExpression(ctx, ctx.GetCurrentDatabase(), normalizeExpressions(tableAliases, extractExpressions(cols)...)...)
exprs := extractExpressions(cols)
idx := ia.IndexByExpression(ctx, ctx.GetCurrentDatabase(), normalizeExpressions(tableAliases, exprs...)...)
// if we do not find a perfect index, take the first partial index if there is one.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only works for a single column index, won't match multiple columns. Add a todo?

@reltuk reltuk merged commit c72de60 into master Mar 2, 2021
@Hydrocharged Hydrocharged deleted the aaron/indexed-joins-support-partial-index branch December 8, 2021 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants