forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
50674: opt: modify PushLimitIntoIndexJoin to not directly create limited scans r=DrewKimball a=DrewKimball Previously, the PushLimitIntoIndexJoin rule only matched when the index join input was a constrained scan that could take the limit value as a hard limit. This patch relaxes the match condition to allow any index join with any input. In addition, rather than directly creating a limited scan, the rule now simply pushes the limit on top of the input of the index join. This is useful because index joins can be expensive, and discarding input rows can decrease the cost. It also allows the SplitScansIntoUnionScans rule to fire where previously the index join would have prevented this. Co-authored-by: Drew Kimball <[email protected]>
- Loading branch information
Showing
4 changed files
with
110 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters