Opened 6 years ago

Closed 3 years ago

#4075 closed defect (wontfix)

Unary Union performance regression between GEOS 3.6.1 and GEOS 3.6.2

Reported by: jonaspedersen Owned by: robe
Priority: medium Milestone: PostGIS GEOS
Component: postgis Version: 2.4.x
Keywords: GEOS, ST_Union Cc: lr@…

Description

After upgrading PostGIS from version 2.4.1 to 2.4.3 (and in the process also updating the geos dependency from 3.5.0 to 3.6.2) a query on a dataset of 5310482 rows with a geometry of type Polygon which used to take around 3.5 hours to complete, now doesn't complete. The query is below: select

st_multi((st_dump(geom)).geom)::geometry(multipolygon,25832) as geom

from (

select st_union(b.geom) as geom from temp_jonyp.st_union_test b ) foo

;

I've enclosed a sample dataset of 31489 rows. Using the sample dataset, the query on the machine with PostGIS 2.4.3 takes 1 minute and 20 seconds, and on a Windows machine with PosGIS 2.3.2 (geos 3.5.0) it takes about 20 seconds

This ticket refers to a discussion on the PostGIS Users Mailing List, header 'Performance problems with ST_Union on postgres 9.6, Postgis 2.4.3 running on top of Red Hat 7.4' Version information: 'PostgreSQL 9.6.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16), 64-bit POSTGIS="2.4.3 r16312" PGSQL="96" GEOS="3.6.2-CAPI-1.10.2 4d2925d6" SFCGAL="1.2.2" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 1.11.4, released 2016/01/25" LIBXML="2.9.1" LIBJSON="0.11" RASTER'

Attachments (1)

st_union_test.zip (2.7 MB ) - added by jonaspedersen 6 years ago.
Sample dataset of 31489 rows (building polygons in Western Jutland, Denmark)

Change History (6)

by jonaspedersen, 6 years ago

Attachment: st_union_test.zip added

Sample dataset of 31489 rows (building polygons in Western Jutland, Denmark)

comment:1 by robe, 6 years ago

Version 0, edited 6 years ago by robe (next)

comment:2 by robe, 6 years ago

Owner: changed from pramsey to robe

comment:3 by pramsey, 5 years ago

Truck at 1b24aed3c5ef4f972dd46ca46b6b389d02f38136 has a fix that appears to address this. Confirm please, and it will be back-patched.

comment:4 by mdavis, 4 years ago

Summary: Regression between GEOS 3.6.1 and GEOS 3.6.2Unary Union performance regression between GEOS 3.6.1 and GEOS 3.6.2

comment:5 by pramsey, 3 years ago

Resolution: wontfix
Status: newclosed

three versions are out since this, and latest have completely new engine, closing out.

Note: See TracTickets for help on using tickets.