prioritize low selectivity indexes in the greedy search procedure of Selectivity()
#19904
Labels
component/statistics
sig/planner
SIG: Planner
type/enhancement
The issue or PR belongs to an enhancement.
Development Task
Consider this case:
When computing the total selectivity of this filter, current greedy algorithm would choose index
ab
andcd
to cover the filters, and multiply these 2 selectivities computed.However, if column
b
andc
have some explicit or implicit functional dependency, specifically, there is no record satisfyingb = 1 and c = 1
at all, the final selectivity computed would be too high. Instead, if we can put indexbc
into the covering index set, then the final selectivity would be the correct0
.The text was updated successfully, but these errors were encountered: