opt: improve cost model for lookup joins #67479
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-sql-queries
SQL Queries Team
Projects
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
The text was updated successfully, but these errors were encountered: