• Varun Gupta's avatar
    MDEV-24740: Selectivity for equi-join predicates not involed in ref access is... · 5b4a2d94
    Varun Gupta authored
    MDEV-24740: Selectivity for equi-join predicates not involed in ref access is not taken into account for join cardinality estimation
    
    First the function was checking if there is a keyuse only then we were
    trying to use the function to get estimates for the equi-join predicated.
    This function can calculate the estimates for selectivity for an non-indexed
    equi-join condition also.
    
    Second change is done when we try to get the avg frequency of a column,
    then we need to make sure that statistics are available in the statistical
    tables. This check was missing and so get_column_avg_frequency() was
    returning zero for columns.
    
    Updated few tests results.
    5b4a2d94
subselect_sj2_jcl6.result 47.7 KB