[postgis-users] Counting intersecting polygons

Marcin Mionskowski mionskowskimarcin at gmail.com
Tue May 28 10:47:30 PDT 2019


I checked on the larger tables - you're right. Your approach
significantly speeds up the query. Nice hint - thanks!

W dniu wto, 28.05.2019 o godzinie 08∶36 +0200, użytkownik Arnaud L.
napisał:
> Le 27/05/2019 à 14:47, Marcin Mionskowski a écrit :
> > SELECT COUNT(DISTINCT t1.column_with_unique_ids)
> > FROM Table_1 t1
> > 	,Table_2 t2
> > WHERE ST_Intersects(t1.wkb_geometry,t2.wkb_geometry)
> 
> 
> Unless you're running PG12 and PostGIS 3 (see Paul Ramsey's latest 
> post), the "WHERE EXISTS" construct will be able to trigger a
> parallel 
> query plan whereas the "JOIN" construct will not.
> 
> Cheers
> --
> Arnaud
> _______________________________________________
> 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