<div dir="ltr"><span style="font-family:monospace"><span style="color:rgb(0,0,0)">Another option to stabilize the scans to try:<br><br> set synchronize_seqscans to off;</span></span><div><span style="font-family:monospace"><font color="#000000"><br></font></span></div><div><span style="font-family:monospace"><font color="#000000">will discourage Postgres to start from the middle of the table at expense of more IO.<br></font>
<br></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 29, 2021 at 12:00 AM Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca">pramsey@cleverelephant.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">That seems more stable.<br>
<br>
> On Apr 28, 2021, at 1:56 PM, Darafei Komяpa Praliaskouski <<a href="mailto:me@komzpa.net" target="_blank">me@komzpa.net</a>> wrote:<br>
> <br>
> since it's a sum of doubles and it's order-dependant, can you try <br>
> <br>
> select sum(st_area(geom::geography) order by st_area(geom::geography)) from va;<br>
> <br>
> On Wed, Apr 28, 2021 at 11:50 PM Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca" target="_blank">pramsey@cleverelephant.ca</a>> wrote:<br>
> Yeah, looks like it wobbles. Two runs, no change in anything at all, just two SQL statements one after another<br>
> <br>
> postgis=# select sum(st_area(geom::geography)) from va;<br>
>         sum         <br>
> --------------------<br>
>  1070124793748.3967<br>
> (1 row)<br>
> <br>
> Time: 1345.384 ms (00:01.345)<br>
> postgis=# select sum(st_area(geom::geography)) from va;<br>
>         sum         <br>
> --------------------<br>
>  1070124793748.3954<br>
> (1 row)<br>
> <br>
> Time: 1352.277 ms (00:01.352)<br>
> <br>
> <br>
> <br>
> > On Apr 28, 2021, at 1:34 PM, Regina Obe <<a href="mailto:lr@pcorp.us" target="_blank">lr@pcorp.us</a>> wrote:<br>
> > <br>
> > I know the difference is pretty small, but how did you manage to get two<br>
> > different answers for area with just swap of GEOS or is that a typo?<br>
> > <br>
> > In 3.8.3 you have  1070124793748.3967<br>
> > <br>
> > In 3.9.2dev you have 1070124793748.3959<br>
> > <br>
> > Is that 2 digit different just voodoo powder.<br>
> > I thought given  the same exact machine, same version of PostGIS  and same<br>
> > version of Proj we could count on no randomness of answers.<br>
> > <br>
> > Is the answer the same each and every time you run it for a given setup or<br>
> > does it wabble a bit?<br>
> > <br>
> >> -----Original Message-----<br>
> >> From: postgis-devel [mailto:<a href="mailto:postgis-devel-bounces@lists.osgeo.org" target="_blank">postgis-devel-bounces@lists.osgeo.org</a>] On<br>
> >> Behalf Of Paul Ramsey<br>
> >> Sent: Tuesday, April 27, 2021 4:47 PM<br>
> >> To: PostGIS Development Discussion <<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a>><br>
> >> Subject: Re: [postgis-devel] Much slower processing on GEOS 3.9.0 versus<br>
> >> 3.8.0 for geodesic area calculation<br>
> >> <br>
> >> Just to stick a nail in the GEOS-version-affects-geography-area<br>
> > conversation,<br>
> >> I took the time to set up two builds (GEOS 3.8 and GEOS 3.9) and swapped<br>
> >> between them without changing anything else about the system.<br>
> >> <br>
> >> postgis=# select postgis_full_version();<br>
> >> <br>
> >> postgis_full_version<br>
> >> <br>
> > ----------------------------------------------------------------------------<br>
> > ------------------<br>
> >> <br>
> > ----------------------------------------------------------------------------<br>
> > ------------------<br>
> >> <br>
> > ----------------------------------------------------------------------------<br>
> > ------------------<br>
> >> <br>
> > ----------------------------------------------------------------------------<br>
> > ---<br>
> >> POSTGIS="3.2.0dev 3.1.0rc1-162-g46efb9f2d" [EXTENSION] PGSQL="130"<br>
> >> GEOS="3.8.3-CAPI-1.13.4" PROJ="8.0.0" GDAL="GDAL 3.2.0, released<br>
> >> 2020/10/26" LIBXML="2.9.4" LIBJSON="0.15" LIBPROTOBUF="1.3.3"<br>
> >> WAGYU="0.5.0 (Internal)"<br>
> >> <br>
> >> postgis=# select sum(st_area(geom::geography)) from va;<br>
> >>        sum<br>
> >> --------------------<br>
> >> 1070124793748.3967<br>
> >> (1 row)<br>
> >> <br>
> >> Time: 1449.551 ms (00:01.450)<br>
> >> <br>
> >> <br>
> >> Then stop the server, change the LD_LIBRARY_PATH to the 3.9 install<br>
> > location<br>
> >> and restart.<br>
> >> <br>
> >> postgis=# select postgis_full_version();<br>
> >> <br>
> >> postgis_full_version<br>
> >> <br>
> > ----------------------------------------------------------------------------<br>
> > ------------------<br>
> >> <br>
> > ----------------------------------------------------------------------------<br>
> > ------------------<br>
> >> <br>
> > ----------------------------------------------------------------------------<br>
> > ------------------<br>
> >> <br>
> > ----------------------------------------------------------------------------<br>
> > ------<br>
> >> POSTGIS="3.2.0dev 3.1.0rc1-162-g46efb9f2d" [EXTENSION] PGSQL="130"<br>
> >> GEOS="3.9.2dev-CAPI-1.14.2" PROJ="8.0.0" GDAL="GDAL 3.2.0, released<br>
> >> 2020/10/26" LIBXML="2.9.4" LIBJSON="0.15" LIBPROTOBUF="1.3.3"<br>
> >> WAGYU="0.5.0 (Internal)"<br>
> >> <br>
> >> postgis=# select sum(st_area(geom::geography)) from va;<br>
> >>        sum<br>
> >> --------------------<br>
> >> 1070124793748.3959<br>
> >> (1 row)<br>
> >> <br>
> >> Time: 1439.969 ms (00:01.440)<br>
> >> <br>
> >> <br>
> >> <br>
> >> There's no effect to be seen when GEOS version is the only variable in<br>
> > play.<br>
> >> <br>
> >> P<br>
> >> _______________________________________________<br>
> >> postgis-devel mailing list<br>
> >> <a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
> >> <a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a><br>
> > <br>
> > _______________________________________________<br>
> > postgis-devel mailing list<br>
> > <a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
> > <a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a><br>
> <br>
> _______________________________________________<br>
> postgis-devel mailing list<br>
> <a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
> <a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a><br>
> <br>
> <br>
> -- <br>
> Darafei "Komяpa" Praliaskouski<br>
> OSM BY Team - <a href="http://openstreetmap.by/" rel="noreferrer" target="_blank">http://openstreetmap.by/</a><br>
> _______________________________________________<br>
> postgis-devel mailing list<br>
> <a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
> <a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a><br>
<br>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Darafei "Komяpa" Praliaskouski<br>OSM BY Team - <a href="http://openstreetmap.by/" target="_blank">http://openstreetmap.by/</a><br></div></div>