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

opt: reduce opt.ColSet allocs when exploring partial index scans #140035

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

mgartner
Copy link
Collaborator

@mgartner mgartner commented Jan 29, 2025

When exploring a partial index scan, we previously built a set of
columns held constant by partial index predicate, and then built another
set of those columns that are not composite key encoded. Now, instead of
building the second set, we remove columns from the first. This will
reduce allocations in the case where the constant column IDs are larger
than 128.

Epic: None
Release note: None

When exploring a partial index scan, we previously built a set of
columns held constant by partial index predicate, and then built another
set of those columns that are not composite key encoded. Now, instead of
building the second set, we remove columns from the first. This will
reduce allocations in the case where the constant column IDs are larger
than 128.

Release note: None
@mgartner mgartner requested a review from a team January 29, 2025 16:06
@mgartner mgartner requested a review from a team as a code owner January 29, 2025 16:06
@mgartner mgartner requested review from yuzefovich and removed request for a team January 29, 2025 16:06
Copy link

blathers-crl bot commented Jan 29, 2025

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@mgartner mgartner requested a review from DrewKimball January 29, 2025 16:07
Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find! :lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @DrewKimball)

Copy link
Collaborator

@DrewKimball DrewKimball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 2 of 0 LGTMs obtained (waiting on @mgartner)

@mgartner
Copy link
Collaborator Author

TFTRs!

bors r+

@craig craig bot merged commit 084c62f into cockroachdb:master Jan 30, 2025
22 checks passed
@mgartner mgartner deleted the scan-index-opt branch January 30, 2025 19:48
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