[postgis-users] invalid join selectivity: 179531936.000000

Paul J. Caritj caritj at gmail.com
Thu Sep 24 16:32:39 PDT 2015


Hello,
I am having trouble with what I expected to be a simple query. I have two
tables, one of census tracts (with a multipolygon geometry column, srid
4269), and another of sites (with a point geometry column, srid 4269). I
want to find the number of sites that are within a tract of more than a
given population, so I've tried:

SELECT count(sites.id) FROM sites, census_tracts WHERE AND
census_tracts.population > 2000 AND ST_Contains(census_tracts.geometry,
sites.location);

But when I do this I get: psycopg2.InternalError: invalid join selectivity:
179531936.000000.

Both of the relevant tables have been analyzed and vacuumed.

The output of postgis_full_version() is

POSTGIS="2.1.8 r13780" GEOS="3.4.2-CAPI-1.8.2 r3924" PROJ="Rel. 4.8.0, 6
March 2012" GDAL="GDAL 1.11.1, released 2014/09/24" LIBXML="2.7.8"
LIBJSON="UNKNOWN" RASTER

I'm using Windows 7.

Does this ring a bell for anyone?

Thanks very much!

-Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150924/5b64ef45/attachment.html>


More information about the postgis-users mailing list