[postgis-devel] CascadedUnion Early Results

Paul Ramsey pramsey at cleverelephant.ca
Tue Jan 20 13:15:47 PST 2009


For completeness, the whole table, about 4x faster:

uniontest=# select count(*) from counties;
  count
-------
   3140
(1 row)

uniontest=# select st_area(st_union(the_geom)) from counties;      
st_area
------------------
  1095.88034519544
(1 row)

Time: 42352.399 ms

uniontest=# select st_area(st_union_fast(the_geom)) from counties;
      st_area
------------------
  1095.88034519544
(1 row)

Time: 11493.832 ms

On Jan 20, 2009, at 1:11 PM, Paul Ramsey wrote:

> Looks good so far. Still chasing down an issue with GEOS before I  
> can commit, but here's the current results:
>
>
> uniontest=# select st_area(st_union(the_geom)) from counties where  
> state_name = 'Texas';
>     st_area
> ------------------
> 65.0596422159988
> (1 row)
>
> Time: 702.491 ms
>
> uniontest=# select st_area(st_union_fast(the_geom)) from counties  
> where state_name = 'Texas';
>     st_area
> ------------------
> 65.0596422159988
> (1 row)
>
> Time: 216.526 ms
>
> In the final commit there will just be one st_union() that does the  
> right thing. I made two so I could do comparisons like the above  
> more easily. Perhaps I should leave in a legacy st_union_slow() for  
> people to compare with...
>
> --
> Paul Ramsey
> OpenGeo - http://opengeo.org
> Putting the "Po" in "PostGIS".
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel


--
Paul Ramsey
pramsey at cleverelephant.ca
+1 250 885 0632




More information about the postgis-devel mailing list