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

opt: improve cost model for lookup joins #67479

Open
cucaroach opened this issue Jul 12, 2021 · 1 comment
Open

opt: improve cost model for lookup joins #67479

cucaroach opened this issue Jul 12, 2021 · 1 comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team
Projects

Comments

@cucaroach
Copy link
Contributor

cucaroach commented Jul 12, 2021

The lookup join cost model mostly falls back to the index lookup cost. As the joinreader gains new functionality (see #51576) we want to update the model based on some empirical data from some well known workload. As a corollary to this work it would be good to look at adding table statistics to the regional_by_row tests that are relying on lookupExpr based joins. The issue at hand is that the cost model doesn't distinguish between a partial index and a full index w/ lookupExpr. Intuitively the partial index should have a lower cost based on having fewer columns and reduced I/O costs but in practice they come out roughly the same.

Jira issue: CRDB-8561

@cucaroach cucaroach added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team labels Jul 12, 2021
@blathers-crl blathers-crl bot added this to Triage in SQL Queries Jul 12, 2021
@rytaft rytaft moved this from Triage to 21.2 Low Likelihood (10%) in SQL Queries Jul 13, 2021
@mgartner mgartner moved this from 22.1 Low Likelihood (10%) to 22.2 Low Likelihood (10%) in SQL Queries May 16, 2022
@mgartner mgartner moved this from 22.2 Low Likelihood (10%) to 22.2 Medium Likelihood (60%) in SQL Queries May 16, 2022
@mgartner mgartner moved this from 22.2 Release to Backlog in SQL Queries Jul 7, 2022
@github-actions
Copy link

We have marked this issue as stale because it has been inactive for
18 months. If this issue is still relevant, removing the stale label
or adding a comment will keep it active. Otherwise, we'll close it in
10 days to keep the issue queue tidy. Thank you for your contribution
to CockroachDB!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team
Projects
Archived in project
SQL Queries
Backlog (DO NOT ADD NEW ISSUES)
Development

No branches or pull requests

2 participants