-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: Fix join cost estimates (#3831)
This PR fixes join cost estimates in the following ways: - Uses number of rows instead of size in bytes for making probe side decisions - Decreases the aggressiveness of cardinality reductions when there is an `is not NULL` filter - Decreases the aggressiveness of inequality filters, especially since these often appear as pairs of a "between" clause - Increases the aggressiveness of exact equality filters. - For join edges where there are more than one join condition, adjust cost estimations so that we compute the total domain as `|(key1, key2, ...)| ~= min(|left side|, |right side|)`. With multiple join conditions, we know that the join is not a pk-fk join on each join key. Rather, it's a pk-fk join on the tuple of join keys, which we estimate as the cardinality of the smaller table of the join.
- Loading branch information
1 parent
b830647
commit 2351ba4
Showing
4 changed files
with
234 additions
and
67 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