Skip to content

sql: some optimizations for deleteRangeNode#170872

Draft
yuzefovich wants to merge 2 commits into
cockroachdb:masterfrom
yuzefovich:delete-range
Draft

sql: some optimizations for deleteRangeNode#170872
yuzefovich wants to merge 2 commits into
cockroachdb:masterfrom
yuzefovich:delete-range

Conversation

@yuzefovich
Copy link
Copy Markdown
Member

@yuzefovich yuzefovich commented May 24, 2026

This commit implements a couple of minor optimizations for the
deleteRangeNode:

  • if the table has only one column family, then we know that each
    deleted key corresponds to a different row, so we can skip decoding
    the prefix of each key. In turn, this allows us to leave the fetcher
    uninitialized.
  • we don't need to make a copy of spans in the beginning since we're
    holding the only reference to the slice and can modify it as we
    please.

Touches: #138975
Epic: None
Release note: None

This commit implements a couple of minor optimizations for the
deleteRangeNode:
- if the table has only one column family, then we know that each
deleted key corresponds to a different row, so we can skip decoding
the prefix of each key. In turn, this allows us to leave the fetcher
uninitialized.
- we don't need to make a copy of spans in the beginning since we're
holding the only reference to the slice and can modify it as we
please.

Release note: None
@trunk-io
Copy link
Copy Markdown
Contributor

trunk-io Bot commented May 24, 2026

Merging to master in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

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.

2 participants