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

release-19.2: opt: don't zigzag redundantly #42186

Merged
merged 1 commit into from
Nov 5, 2019

Conversation

RaduBerinde
Copy link
Member

Backport 1/1 commits from #42159.

/cc @cockroachdb/release


Previously, we would zigzag on any pair of indexes where both had a
prefix constrained by the fixed cols. This restriction can be
strengthened: it's pointless to zigzag on any pair of indexes where the
fixed cols of one are a subset of the fixed cols of another. Adding this
restriction prevents cases like zigzagging on two identical indexes
(which can come up in certain stats scenarios that I do not fully
understand yet).

Release note (sql change): Restricted the set of zigzag joins that are
planned to those which have a chance at being beneficial.

@RaduBerinde RaduBerinde requested a review from a team as a code owner November 5, 2019 15:15
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Previously, we would zigzag on any pair of indexes where both had a
prefix constrained by the fixed cols. This restriction can be
strengthened: it's pointless to zigzag on any pair of indexes where the
fixed cols of one are a subset of the fixed cols of another. Adding this
restriction prevents cases like zigzagging on two identical indexes
(which can come up in certain stats scenarios that I do not fully
understand yet).

Release note (sql change): Restricted the set of zigzag joins that are
planned to those which have a chance at being beneficial.
@justinj
Copy link
Contributor

justinj commented Nov 5, 2019

LGTM, thanks for backporting!

@maddyblue maddyblue merged commit 1f38fe1 into cockroachdb:release-19.2 Nov 5, 2019
spaskob pushed a commit to spaskob/cockroach that referenced this pull request Nov 5, 2019
release-19.2: opt: don't zigzag redundantly
@RaduBerinde RaduBerinde deleted the backport19.2-42159 branch November 6, 2019 15:52
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