[postgis-users] st_union

Sandro Santilli strk at kbt.io
Tue Mar 3 01:17:54 PST 2020


On Mon, Mar 02, 2020 at 02:25:52PM +0000, paul.malm at lfv.se wrote:
> Hi list,
> I would like to do this:
> CREATE TABLE public."Areas_union" AS select  (st_dump(st_union("the_geom"))).geom from "Areas";
> 
> But it takes such a long time to execute, is there a smarter way to do it?

Try this:

  CREATE TABLE public."Areas_union" AS select
  (st_dump(st_unaryunion(st_collect("the_geom")))).geom from "Areas";

--strk;


More information about the postgis-users mailing list