SERVER-139076In Code Review
Report all estimated NDVs and rename selectivity in join explain ndvEstimates
In the detailed join explain output, change each {{ndvEstimates}} entry to: * {{ndvs}} lists the NDV estimate of every side that was estimated: the smaller collection's side always, and the other side when it is available without sampling (unique index or persisted NDV statistics). It replaces {{assumedPkSide}}/{{ndv}}/{{ndvSource}}, which only show the larger of the two. * Rename {{selectivity}} to {{joinPredicateSelectivity}} (= 1 / max(ndv)). {{joinPredicateSel}} in {{cardinality_estimator.