Skip to content

opt: support option to error if query cannot run in a single region #86228

@rytaft

Description

@rytaft

This issue covers phase 1 of #83819. As described in this comment, we should support a mode where we return an error if we cannot prove that the query can run in a single region. This can be supported entirely in the optimizer, and would require giving the "distribute" operator a very large cost (similar to other hints where we give non-compliant plans a "hugeCost"). The execbuilder would then return an error if the chosen plan has a distribute operator. Note that in this first phase, we do not error in the execution engine, so if LOS fails to find a row locally, we may still visit remote regions.

Jira issue: CRDB-18646
Epic: CRDB-17276

Metadata

Metadata

Assignees

Labels

C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries Team

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions