<div><div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 23, 2023 at 20:26 Mike Taves <<a href="mailto:mwtoews@gmail.com" target="_blank">mwtoews@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">On Thu, 24 Aug 2023 at 13:08, Bo Guo <<a href="mailto:bo.guo@gisticinc.com" target="_blank">bo.guo@gisticinc.com</a>> wrote:<br>
> But we ran into severe (15 times) performance degradation when making CS transformation calls such as st_transform (geom, proj4, 4326)<br>
<br>
Note the docs say the geometry ST_Transform(geometry geom, text<br>
from_proj, text to_proj) is not optimized.<br>
<br>
Are you able to assign SRIDs to the geometries and use<br>
ST_Transform(geometry g1, integer srid)? Are there specific SRIDs that<br>
are slower?</blockquote><div dir="auto"><br></div><div dir="auto">I see your upgrade included going from Proj4 to Proj v6. Depending on the transformation, this could account for a large amount of the slowdown. Proj v6 and later, in an effort to be more accurate than Proj4, takes less shortcuts than Proj4 did. This is particularly true if there are multiple possibilities for how to achieve the transformation and which is best (most accurate) could depend on location, or if there are datum transformations involved. Proj4 more or less ignored these by default and Proj 6+ tries to take the more accurate approach which can take longer. </div><div dir="auto"><br></div><div dir="auto">Also, Proj v6 was the first implementation of this new strategy. At this point in time it is rather outdated. My experience is Proj v7, v8, and v9 each improved performance.</div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)" dir="auto"><br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br>
</blockquote></div></div>
</div>