Selectivity estimate for equality predicate (1 / distinct_count).
(&self)
| 133 | |
| 134 | /// Selectivity estimate for equality predicate (1 / distinct_count). |
| 135 | pub fn eq_selectivity(&self) -> f64 { |
| 136 | if self.distinct_count == 0 { |
| 137 | 1.0 |
| 138 | } else { |
| 139 | 1.0 / self.distinct_count as f64 |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | /// Selectivity estimate for range predicate (heuristic: 0.33). |
| 144 | pub fn range_selectivity(&self) -> f64 { |
no outgoing calls