MobilityDB 1.1

◆ span_sel_contains()

static double span_sel_contains ( SpanBound const_lower,
SpanBound const_upper,
SpanBound hist_lower,
int  hist_nvalues,
Datum hist_length,
int  hist_length_nvalues 
)
static

Calculate selectivity of "var @> const" operator, i.e., estimate the fraction of spans that contain the constant lower and upper bounds.

This uses the histograms of span lower bounds and span lengths, on the assumption that the span lengths are independent of the lower bounds.