-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Go: Fix bad join order in comparesFirstCharacter
#18826
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more
DCA shows it fixing the bad join order on all the repos 🎉 . |
You may as well go one better: right now it's saying, "take all the |
Surely that's the part you want to do early. I did try only putting the binding pragma in the GVN part. It had a slightly worse join order because it choose to do "reads of strings" first. But you may be right that it protects us better from the worst case. |
Yeah I'd say that's better, in that it's linear in the size of the database -- ideally we should restrict the pool as small as possible before going through GVN, because that's where the quadratic term goes in. |
The docs on join orders say that there isn't any way to use pragmas to make a predicate go last, so I pulled what we want out as a |
|
@aschackmull Would |
I haven't looked into this particular case - I was just triggered to amend the doc based on your statement.
True. What you did in this particular case looks reasonable to me. (Although the RA you posted as the "after" version above doesn't look right - you have two predicates instead of one now, so I'd expect two pipelines in the "after" version). |
Yes, that RA is out of date. With the latest version of the code that uses a separate
|
Old join order (on
uber/aresdb
):After the change: