[postgis-users] Row estimations

Paul Ramsey pramsey at cleverelephant.ca
Thu Dec 15 09:13:43 PST 2022

On Thu, Dec 15, 2022 at 1:03 AM Sandro Santilli <strk at kbt.io> wrote:
> On Tue, Dec 13, 2022 at 11:31:05AM -0800, Paul Ramsey wrote:
> > Just to put a nail in this one: the last time our selectivity estimates for Contains/Within were good was version 2.1, which used the && operator instead of hte ~/@ operators in the SQL wrapper functions.
> I think I was the one chaing from && to ~/@ as they are more correct.
> If we're going to change the selectivity estimator we should consider
> using a different name to estimate the different filters, just in case
> we'll use different implementation for one or the other. For points
> they are really equal but for polygons estimates could be very
> different for intersect and full containment (polygons could only
> touch or have small overlap but very never be nested).

The reality of estimating off of the gridded histogram is there's no
really any way to distinguish between intersects/contains strategies.
You don't know the extents of the samples that fill in the grid, just
their presence/absence in a given grid cell. I'd rather not build
foundations for a house I will never erect.


> --strk;
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users

More information about the postgis-users mailing list