[postgis-users] Counting intersecting polygons

Arnaud L. arnaud.listes at codata.eu
Mon May 27 23:36:59 PDT 2019


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


More information about the postgis-users mailing list