Would any of the 8.4 implementation of the generic array_agg() function be applicable to this?<br><br><div class="gmail_quote">On Wed, Jan 21, 2009 at 11:10 AM, Obe, Regina <span dir="ltr"><<a href="mailto:robe.dnd@cityofboston.gov">robe.dnd@cityofboston.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">That is not surprising.  I think much of the benefit of my code was<br>
spoon feeding to postgis so sort of acting as a memory manager within<br>
the PostgreSQL context and my arrays were much smaller -- never ended up<br>
with a single array of yeh big as I recall.  Though its been a while<br>
since I have looked.<br>
<br>
Anyrate I'll retest in the next day or so against 3.1.   I would be<br>
curious to see the results.<br>
<br>
Yes accumulation when you get in the 1000s is non-trivial because<br>
PostgreSQL has to resize the array.<br>
<br>
Which is why a construct such as<br>
<br>
ARRAY(SELECT the_geom FROM sometable)<br>
<br>
is faster than<br>
<br>
SELECT ST_Accum(the_geom)<br>
FROM sometable<br>
<div class="Ih2E3d"><br>
-----Original Message-----<br>
From: <a href="mailto:postgis-devel-bounces@postgis.refractions.net">postgis-devel-bounces@postgis.refractions.net</a><br>
[mailto:<a href="mailto:postgis-devel-bounces@postgis.refractions.net">postgis-devel-bounces@postgis.refractions.net</a>] On Behalf Of Paul<br>
Ramsey<br>
</div><div><div></div><div class="Wj3C7c">Sent: Wednesday, January 21, 2009 12:05 PM<br>
To: PostGIS Development Discussion<br>
Subject: Re: [postgis-devel] Another Data Point<br>
<br>
Interesting! The Shark only samples for about 20 seconds, so I only<br>
got the first 10% or so of the run, and the biggest user in that time<br>
period memcpy'ing in LWGEOM_accum (postgis) and<br>
advance_transition_function (pgsql). So we are spending a non-trivial<br>
amount of time just accumulating the input...<br>
<br>
P<br>
<br>
On Wed, Jan 21, 2009 at 9:00 AM, Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca">pramsey@cleverelephant.ca</a>><br>
wrote:<br>
> The glove is dropped indeed... why speculate when I have the Shark...<br>
> time to see where our time goes...<br>
><br>
> P<br>
><br>
> On Wed, Jan 21, 2009 at 8:55 AM, Martin Davis<br>
<<a href="mailto:mbdavis@refractions.net">mbdavis@refractions.net</a>> wrote:<br>
>> Go for it, Regina!  The glove is dropped...<br>
>><br>
>> Although I suspect this test may simply be running into the slower<br>
memory<br>
>> performance due to any or all of Postgres, C, GEOS compared to good<br>
ol'<br>
>> Java...  Hard to beat that tuned JVM memory manager!<br>
>><br>
>> Obe, Regina wrote:<br>
>>><br>
>>> Ah I think JTS was able to do this in about 40-50 seconds.  And my<br>
>>> version was able to beat out Kevin's nested by a small margin.  I'll<br>
>>> retest on mine.<br>
>>><br>
>>> So I think we still need work here.<br>
>>><br>
>>> I'm curious what would happen if I combined the algorithm I wrote<br>
with<br>
>>> the new ST_Union how things would fair.  In theory it should fair<br>
the<br>
>>> same, but I'm not really using Martin's cascaded union algorithm to<br>
the<br>
>>> letter.<br>
>>><br>
>>><br>
>>> -----Original Message-----<br>
>>> From: <a href="mailto:postgis-devel-bounces@postgis.refractions.net">postgis-devel-bounces@postgis.refractions.net</a><br>
>>> [mailto:<a href="mailto:postgis-devel-bounces@postgis.refractions.net">postgis-devel-bounces@postgis.refractions.net</a>] On Behalf Of<br>
Paul<br>
>>> Ramsey<br>
>>> Sent: Wednesday, January 21, 2009 12:50 AM<br>
>>> To: PostGIS Development Discussion<br>
>>> Cc: <a href="mailto:lee.keel@uai.com">lee.keel@uai.com</a><br>
>>> Subject: [postgis-devel] Another Data Point<br>
>>><br>
>>> Using the original sample set from Lee Keel,<br>
>>><br>
>>> With the old style ST_Union, 3 hours, 27 minutes:<br>
>>><br>
>>> uniontest=# select st_area(st_union(the_geom)) from sample_poly;<br>
>>>      st_area<br>
>>> --------------------<br>
>>>  0.0324039850011104<br>
>>> (1 row)<br>
>>><br>
>>> Time: 12419261.819 ms<br>
>>><br>
>>><br>
>>> With the new cascaded ST_Union, 4 minutes, 30 seconds, or 46 times<br>
>>> faster.<br>
>>><br>
>>> uniontest=# select st_area(st_union_fast(the_geom)) from<br>
sample_poly;<br>
>>>      st_area<br>
>>> --------------------<br>
>>>  0.0324039850054305<br>
>>> (1 row)<br>
>>><br>
>>> Time: 271618.181 ms<br>
>>><br>
>>><br>
>>> That's one nasty data set.<br>
>>><br>
>>> P.<br>
>>> _______________________________________________<br>
>>> postgis-devel mailing list<br>
>>> <a href="mailto:postgis-devel@postgis.refractions.net">postgis-devel@postgis.refractions.net</a><br>
>>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-devel" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-devel</a><br>
>>> -----------------------------------------<br>
>>> The substance of this message, including any attachments, may be<br>
>>> confidential, legally privileged and/or exempt from disclosure<br>
>>> pursuant to Massachusetts law. It is intended<br>
>>> solely for the addressee. If you received this in error, please<br>
>>> contact the sender and delete the material from any computer.<br>
>>> _______________________________________________<br>
>>> postgis-devel mailing list<br>
>>> <a href="mailto:postgis-devel@postgis.refractions.net">postgis-devel@postgis.refractions.net</a><br>
>>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-devel" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-devel</a><br>
>>><br>
>>><br>
>><br>
>> --<br>
>> Martin Davis<br>
>> Senior Technical Architect<br>
>> Refractions Research, Inc.<br>
>> (250) 383-3022<br>
>><br>
>> _______________________________________________<br>
>> postgis-devel mailing list<br>
>> <a href="mailto:postgis-devel@postgis.refractions.net">postgis-devel@postgis.refractions.net</a><br>
>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-devel" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-devel</a><br>
>><br>
><br>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@postgis.refractions.net">postgis-devel@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-devel" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-devel</a><br>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@postgis.refractions.net">postgis-devel@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-devel" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>************************************<br>David William Bitner<br>