MobilityDB 1.1
|
◆ geo_joinsel()Given two statistics histograms, what is the selectivity of a join driven by the && operator? Join selectivity is defined as the number of rows returned by the join operator divided by the number of rows that an unconstrained join would return (nrows1*nrows2). To get the estimate of join rows, we walk through the cells of one histogram, and multiply the cell value by the proportion of the cells in the other histogram the cell overlaps: val += val1 * ( val2 * overlap_ratio ) |