Skip to content

Conversation

@yuzefovich
Copy link
Member

@yuzefovich yuzefovich commented Jan 7, 2026

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 a team as a code owner January 7, 2026 15:59
@yuzefovich yuzefovich requested review from ZhouXing19 and removed request for a team January 7, 2026 15:59
@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 a review from michae2 January 7, 2026 15:59
@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

@yuzefovich yuzefovich changed the title release-25.3: release-25.3.7-rc: sql: add distsql_prevent_partitioning_soft_limited_scans release-25.3: sql: add distsql_prevent_partitioning_soft_limited_scans Jan 7, 2026
@yuzefovich yuzefovich removed the request for review from ZhouXing19 January 7, 2026 16:02
@michae2 michae2 merged commit 70f3de2 into cockroachdb:release-25.3 Jan 7, 2026
17 checks passed
@yuzefovich yuzefovich deleted the blathers/backport-release-25.3-160604 branch January 7, 2026 18:36
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-25.3.8

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants