[postgis-devel] GeomUnion speedups
strk at refractions.net
strk at refractions.net
Sat Jun 25 03:15:36 PDT 2005
A summary of my recent works in GeomUnion speedup.
Martin Davis suggested me that a buffer(0) of a collection
of input geometries has the same result then an incremental
union of them.
I tested this and we *really* get a big performance
improvement this way, as graphs for geometry components
are built only once!
You can test this easily using buffer(collect(the_geom), 0)
in place of geomunion(the_geom).
If there are no drawbacks in this I'd have geomunion directly
do this for us. The drawback I immediately see is that
while geomunion does not accept GEOMETRYCOLLECTION in input
this method does allow them. Should we see this a bug ? (we
can perform the check from within GeomUnion to avoid this).
Martin, are there other drawbacks ?
About memory we might implement a chunk-based incremental
approach whereas blocks of geometries (defined by memory
size maybe ?) would be buffer(0)'d to early dissolve
vertexes and reduce memory occupation. Thoughts on this ?
--strk;
More information about the postgis-devel
mailing list