Description
(#74303) Adds support for combining selectivities of ORed equijoin predicates with an industry-standard approach using the disjunction rule:
Given predicates A and B and probability function P:
P(A or B) = P(A) + P(B) - P(A and B)
This issue is opened to also apply the rule to single-table filter predicates on different columns for both Selects and Joins, e.g.,
col1 = 1 OR col2 = 1
Selectivities of predicates on the same column should be additive if the ranges are non-overlapping, e.g.,
col1 < 1 OR col1 > 15
Describe alternatives you've considered
Multicolumn stats could be used in the future to further improve estimates by getting a more accurate result for P(A and B).
Jira issue: CRDB-12458
Description
(#74303) Adds support for combining selectivities of ORed equijoin predicates with an industry-standard approach using the disjunction rule:
This issue is opened to also apply the rule to single-table filter predicates on different columns for both Selects and Joins, e.g.,
Selectivities of predicates on the same column should be additive if the ranges are non-overlapping, e.g.,
Describe alternatives you've considered
Multicolumn stats could be used in the future to further improve estimates by getting a more accurate result for P(A and B).
Jira issue: CRDB-12458