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: Make join_search faster #303

Merged
merged 4 commits into from Feb 17, 2021

Conversation

reltuk
Copy link
Contributor

@reltuk reltuk commented Feb 17, 2021

This helps the analyzer actually complete analyzing some of the example queries we're working on that have 9+ table joins. The basic idea is to recursively build every binary tree that has the in-order traversal we want and then attempt to apply join conditions to those trees.

Performance here can be further improved by coupling visitJoinSearchNodes and assignConditions so that we can prune large portions of the subspace as being impossible from a join conditions standpoint. I may work on that next depending upon how further benchmarking goes. Currently a previous query which failed to analyze before take 30s.

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.

LGTM!

sql/analyzer/join_search.go Outdated Show resolved Hide resolved
sql/analyzer/join_search.go Outdated Show resolved Hide resolved
sql/analyzer/join_search.go Show resolved Hide resolved
sql/analyzer/join_search.go Show resolved Hide resolved
@reltuk reltuk merged commit bb0f2ed into master Feb 17, 2021
@Hydrocharged Hydrocharged deleted the aaron/analyzer-join-search-goes-faster branch February 19, 2021 11:33
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