• Varun Gupta's avatar
    MDEV-16695: Estimate for rows of derived tables is very high when we are using index_merge union · 38b3e52c
    Varun Gupta authored
    For index merge union[or sort union], the estimates are not taken into account while calculating the selectivity of
    a condition. So instead of showing the estimates of the index merge union[or sort union], it shows estimates equal to
    all the records of the table.
    The fix for the issue is to include the selectivity of index merge
    union[or sort union] while calculating the selectivity of a condition.
    38b3e52c
opt_range.cc 494 KB