[postgis-users] Query to create 2-pt linestrings from Multilinestrings running very very very slow

Ruth Simm goldfish_and_muskie at yahoo.com
Wed Jun 24 11:05:40 PDT 2015


Hi all,
I began running this query on a table with 19,763 rows...and it is taking forever (up to 14 hours and still running). I was wondering if there was any other way to optimize this... (note: without creating edges with Topology - which is equally slow)? 
Thank you for your time.

Specs:PostgreSQL 9.2.4PostGis 2.1.0
SELECT row_number() OVER() new_id, geom 
INTO linestrings FROM
  (SELECT 
    (ST_Dump(ST_Node(ST_Union(geom)))).geom geom 
  FROM multlinestrings) a;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150624/9fd8ce97/attachment.html>


More information about the postgis-users mailing list