From: Regina Obe Date: Wed, 14 Mar 2012 21:45:23 +0000 (+0000) Subject: put note about slowness of raster st_union and promise it will be better in later... X-Git-Tag: 2.0.0beta4~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0981ef63f15137b588d40811870872423b1124cd;p=postgis put note about slowness of raster st_union and promise it will be better in later versions git-svn-id: http://svn.osgeo.org/postgis/trunk@9502 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_raster.xml b/doc/reference_raster.xml index 1efe1d86a..b4cb2ef44 100644 --- a/doc/reference_raster.xml +++ b/doc/reference_raster.xml @@ -6376,10 +6376,10 @@ FROM prunion; - See Also - , , , , , , , + , , , , , , , + , , @@ -7212,6 +7212,9 @@ UPDATE wind There are several other variants of this function not installed by default in PostGIS 2.0.0 -- these can be found in the raster/scripts/plpgsql/st_union.sql file of postgis source code. + The ST_Union function in 2.0.0 is currently implemented predominantly in plpgsql. Because of the memory copying needed to copy between the C and plpgsql layer, this function is much much slower than it needs to be. + Future 2.0 releases will have this function implemented in C, so you should witness significant improvements in speed when that happens. As a general rule of thumb you want to minimize the size of the rasters, that ST_Union works with. + One approach is to clip first and then union the clipped versions. Refer to select parcels example in . That example if unioning is done before clipping takes about 4 times longer. With the higher res imagery the timing the ratio between is even higher. Availability: 2.0.0 @@ -7235,7 +7238,7 @@ WHERE ST_Intersects(rast, ST_GeomFromText('LINESTRING(230486 887771, 230500 887 See Also - , + , , ,