Skip to content

Consider table size when choosing join distribution type#17849

Merged
rongrong merged 1 commit intoprestodb:masterfrom
rongrong:cbo
Jun 17, 2022
Merged

Consider table size when choosing join distribution type#17849
rongrong merged 1 commit intoprestodb:masterfrom
rongrong:cbo

Conversation

@rongrong
Copy link
Copy Markdown
Contributor

@rongrong rongrong commented Jun 7, 2022

Cherry-pick of trinodb/trino#5141
Cherry-pick of trinodb/trino#11584

Co-authored-by: sopel39 karol.sobczak@karolsobczak.com
Co-authored-by: Raunaq Morarka raunaqmorarka@gmail.com

Test plan - github

== RELEASE NOTES ==

General Changes
* When CBO fails, consider source table size when choosing join order and join distribution type. This might improve query plan for queries with complex projections on small tables. This optimization can be disabled by setting session property ``size_based_join_distribution_type`` to ``false``.

@kaikalur
Copy link
Copy Markdown
Contributor

Do we want a session property for this?

@rongrong
Copy link
Copy Markdown
Contributor Author

Added a config/session property, default to true. cc @kaikalur

@ajaygeorge
Copy link
Copy Markdown
Contributor

@rongrong there seems to be a merge conflict. Can you please rebase with master.

Cherry-pick of trinodb/trino#5141
Cherry-pick of trinodb/trino#11584

Co-authored-by: sopel39 <karol.sobczak@karolsobczak.com>
Co-authored-by: Raunaq Morarka <raunaqmorarka@gmail.com>
@rongrong rongrong merged commit da4f2b5 into prestodb:master Jun 17, 2022
@highker highker mentioned this pull request Jul 6, 2022
7 tasks
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.

4 participants