Subscribe to this thread
Home - General / All posts - running GeomUnionAreas in multiiple threads
artlembo


3,404 post(s)
#11-Feb-24 15:41

As far as I can tell, GeomUnionAreas is not an option for parallelization. However, if I have 18 cores, it might be nice to run 18 separate GeomUnionAreas together on each core. Just seeing if divide and conquer might be faster than trying to eat the entire elephant in one bite.

So, for example

GeomUnionAreas(SELECT geom FROM table WHERE mfd_id BETWEEN 1 and 100)

GeomUnionAreas(SELECT geom FROM table WHERE mfd_id BETWEEN 101 and 200)

.

.

then, when those component parts are completed, we can begin merging the 18 separate results together.

Before Postgres had its parallel capabilities, I used to do this with psycopg where I'd spawn a new postgres connection for each single thread process I wanted to run.

Another option might be to create a new table called temptable, and run something like:

INSERT INTO temptable GeomUnionAreas(geom)

FROM table where mfd_id BETWEEN 1 AND 100

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.