Skip to content

opt: add rule to replace outer cols with equivalent non-outer cols #88885

@DrewKimball

Description

@DrewKimball

There have been a few customer issues with long-running correlated queries that could have been decorrelated with the following decorrelation rule: for correlated Select and Join operators that have a filter that sets an outer column equal to a non-outer column, replace all references to the outer column with the equivalent non-outer column. This rule should be valid even for left joins, since any right row for which the replacement does not hold will not become part of the output.

Jira issue: CRDB-20024

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