[postgis-devel] CascadedUnion Early Results

Obe, Regina robe.dnd at cityofboston.gov
Tue Jan 20 14:13:31 PST 2009


Ah okay that looks good.  I think the numbers look like about what I got on JTS.

I have to dig up that set Kevin had given me way back when.  Kevin you don't still happen to have that do you?  I think it was named sample_poly.zip



-----Original Message-----
From: postgis-devel-bounces at postgis.refractions.net on behalf of Paul Ramsey
Sent: Tue 1/20/2009 5:08 PM
To: PostGIS Development Discussion
Subject: Re: [postgis-devel] CascadedUnion Early Results
 
Here's your test, slightly modified. Shows about 30-times improvement
over traditional union.

  SELECT state,
   SUM(ST_NPoints(the_geom)) As  numpointsbefore,
     ST_NPoints(ST_Union(the_geom)) As numpointsafter
   FROM usstatebounds
   GROUP BY state
   ORDER BY state;

Time: 579121.791 ms

  SELECT state,
   SUM(ST_NPoints(the_geom)) As  numpointsbefore,
     ST_NPoints(ST_Union_Fast(the_geom)) As numpointsafter
   FROM usstatebounds
   GROUP BY state
   ORDER BY state;

Time: 21145.717 ms


On Tue, Jan 20, 2009 at 1:42 PM, Obe, Regina <robe.dnd at cityofboston.gov> wrote:
> Paul,
>
> I think we can do better.
>
> As I recall with my cascade union tests I was getting comparable speed
> and JTS was about 2-10 times faster.
>
>
> Can you test the attached data set out.  Then it will be a closer
> comparison.  I think for this set JTS was about 20 seconds.
>
> Below is the link to my results on this way back.
>
> http://postgis.refractions.net/support/wiki/index.php?PL%2FPGSQL%20Pseud
> o%20Cascade%20Union%20Aggregate%20Function
>
>
> (though I don't have the JTS one listed there)
>
> Damn I hope this is the right dataset.  I'll retest on my other box but
> I have so many of these lying around.
>
> Would also be interesting to repeat Kevin's original test that started
> this all out.  I can send you that dataset off list.
>
> Thanks,
> Regina
>
>
>
>
> -----Original Message-----
> From: postgis-devel-bounces at postgis.refractions.net
> [mailto:postgis-devel-bounces at postgis.refractions.net] On Behalf Of Mark
> Cave-Ayland
> Sent: Tuesday, January 20, 2009 4:34 PM
> To: PostGIS Development Discussion
> Subject: Re: [postgis-devel] CascadedUnion Early Results
>
> Paul Ramsey wrote:
>
>> 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
>
> Fascinating. What would be really interesting would be to compare the
> times with the same dataset in JTS so we can get a feel as to whether
> there is any more overhead in the array_accum/GEOS conversion code.
>
>
> ATB,
>
> Mark.
>
> --
> Mark Cave-Ayland
> Sirius Corporation - The Open Source Experts
> http://www.siriusit.co.uk
> T: +44 870 608 0063
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
>
> -----------------------------------------
> The substance of this message, including any attachments, may be
> confidential, legally privileged and/or exempt from disclosure
> pursuant to Massachusetts law. It is intended
> solely for the addressee. If you received this in error, please
> contact the sender and delete the material from any computer.
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
>
_______________________________________________
postgis-devel mailing list
postgis-devel at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20090120/824507c7/attachment.html>


More information about the postgis-devel mailing list