[postgis-devel] ST_Union Parallel Experiment
Regina Obe
lr at pcorp.us
Tue Mar 13 09:36:50 PDT 2018
> Not marking something as PARALLEL SAFE just plainly disables parallel for everything in the query, this was the main reason for PARALLEL SAFE. Without Paul's modification you can still get
> benefit from parallelism, in form of say
> SELECT class, ST_Union(ST_Buffer(geom, 1)) from sometable group by class;
I thought not marking it as higher than PARALLEL Restricted would do that. So PARALLEL restricted would do the same, but PARALLEL SAFE means it can run inside a PARALLEL worker.
What I was asking was:
SELECT class, ST_Union(geom)
FROM sometable GROUP BY class
Someone claimed it was possible for the sorting to happen in parallel, such that all the geometries that fall in a group would be guaranteed to be in one worker.
Then as you said there would be no need to call a combinefunc since all of class A – would have been taken care of and combinefunc would never need to be called?
Beautiful diagram by the way. But perhaps, you need a combinefunc in there anyway even if it's never called because the parallelizer can't guarantee it can allocate all the items that belong in one group to the same worker.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20180313/9683c24d/attachment.html>
More information about the postgis-devel
mailing list