Skip to content

Conversation

@blathers-crl
Copy link

@blathers-crl blathers-crl bot commented Jan 7, 2026

Backport 2/2 commits from #160051 on behalf of @michae2.


sql: add distsql_prevent_partitioning_soft_limited_scans

Add a setting to the physical planner which prevents partitioning of soft-limited scans, to make them match hard-limited scans. This makes them lazier.

Fixes: #160530

Release note (performance improvement): Add a new session variable, distsql_prevent_partitioning_soft_limited_scans, which, when true, prevents scans with soft limits from being planned as multiple TableReaders by the physical planner. This should decrease the initial setup costs of some fully-distributed query plans.


sql: enable distsql_prevent_partitioning_soft_limited_scans by default

Release note (performance improvement): enable setting distsql_prevent_partitioning_soft_limited_scans by default.


Release justification: low-risk performance improvement.

@blathers-crl blathers-crl bot requested a review from a team as a code owner January 7, 2026 08:40
@blathers-crl blathers-crl bot force-pushed the blathers/backport-release-26.1-160051 branch from c5da417 to 37e13e0 Compare January 7, 2026 08:40
@blathers-crl blathers-crl bot requested review from DrewKimball and removed request for a team January 7, 2026 08:40
@blathers-crl blathers-crl bot added blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. labels Jan 7, 2026
@blathers-crl blathers-crl bot requested review from michae2, mw5h and yuzefovich January 7, 2026 08:40
@blathers-crl
Copy link
Author

blathers-crl bot commented Jan 7, 2026

Thanks for opening a backport.

Before merging, please confirm that the change does not break backwards compatibility and otherwise complies with the backport policy. Include a brief release justification in the PR description explaining why the backport is appropriate. All backports must be reviewed by the TL for the owning area. While the stricter LTS policy does not yet apply, please exercise judgment and consider gating non-critical changes behind a disabled-by-default feature flag when appropriate.

@blathers-crl blathers-crl bot added backport Label PR's that are backports to older release branches T-sql-queries SQL Queries Team labels Jan 7, 2026
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Add a setting to the physical planner which prevents partitioning of
soft-limited scans, to make them match hard-limited scans. This makes
them lazier.

Fixes: #160530

Release note (performance improvement): Add a new session variable,
`distsql_prevent_partitioning_soft_limited_scans`, which, when true,
prevents scans with soft limits from being planned as multiple
TableReaders by the physical planner. This should decrease the initial
setup costs of some fully-distributed query plans.
Release note (performance improvement): enable setting
`distsql_prevent_partitioning_soft_limited_scans` by default.
@yuzefovich yuzefovich force-pushed the blathers/backport-release-26.1-160051 branch from 37e13e0 to 03406ae Compare January 7, 2026 10:15
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.

I'd backport both commits to 26.1 right away, but up to you.

@yuzefovich reviewed 11 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @DrewKimball, @michae2, and @mw5h).

@yuzefovich
Copy link
Member

My argument for backporting both commits to 26.1 is the following:

  • the cost of discovering a regression because of enabling it is lower on the innovation 26.1 release than on the regular 26.2 release
  • more baking time on master will not expose the performance regression if it happens, and we don't have a good signal to go proactively look for it either.

Copy link
Collaborator

@michae2 michae2 left a comment

Choose a reason for hiding this comment

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

Good arguments. It does seem lower risk to enable it in 26.1.

@michae2 reviewed 11 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @DrewKimball and @mw5h).

@michae2 michae2 merged commit 48e6e36 into release-26.1 Jan 7, 2026
27 of 28 checks passed
@michae2 michae2 deleted the blathers/backport-release-26.1-160051 branch January 7, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Label PR's that are backports to older release branches blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. T-sql-queries SQL Queries Team target-release-26.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants