There seems to be a massive difference in speed between PostGIS and SQL Server 2012 with a union aggregate function.
SELECT geometry::UnionAggregate(the_geom) FROM loc GROUP BY LocalityCo
SELECT ST_Multi(ST_Union(the_geom)) FROM dummydata.loc GROUP BY "LocalityCo"
I get less then a second in SQL Server 2012 but around 25 seconds in PostGIS.
PostGIS version is:
1.5 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
Is there anything I can do to speed up the PostGIS query or it's just the way it is?
Note: Both have spatial indexes.