Skip to content

Conversation

@yuzefovich
Copy link
Member

Backport 1/2 commits from #160051.

/cc @cockroachdb/release


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.

Release justification: off by default, performance improvement.

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: cockroachdb#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.
@yuzefovich yuzefovich requested a review from michae2 January 7, 2026 10:01
@yuzefovich yuzefovich requested a review from a team as a code owner January 7, 2026 10:01
@blathers-crl
Copy link

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

@michae2 michae2 merged commit 67b1251 into cockroachdb:release-25.3.7-rc Jan 7, 2026
16 checks passed
@yuzefovich yuzefovich deleted the backport25.3.7-rc-160051 branch January 7, 2026 15:59
@yuzefovich
Copy link
Member Author

blathers backport release-25.3

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 T-sql-queries SQL Queries Team target-release-25.3.7

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants