<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 22 Apr 2022 at 05:05, James Klassen <<a href="mailto:klassen.js@gmail.com">klassen.js@gmail.com</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"><div dir="auto">Use EXPLAIN to make sure your query is using indexes appropriately.  And make sure you have created the appropriate indexes.</div><div dir="auto"><br></div><div dir="auto">Make sure you have the various PostgreSQL memory settings configured appropriately.  I’ve seen cases where increasing the memory available to PostgreSQL from the default being the difference between a query taking over 24 hours with the default settings to the same query taking less that 5 minutes.  It is very slow if PostgreSQL needs to use a temporary disk file because it doesn’t have enough RAM to do things like sorts and joins in memory.</div><div dir="auto"><br></div><div dir="auto">There are many examples on the web of how to use explain and how to optimize the memory settings for your computer and usage.</div></blockquote><div><br></div><div>Would indexing make any difference on that recursive query?  </div><div><br></div><div>Regards,</div><div><br></div><div>David</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 21, 2022 at 18:21 Shaozhong SHI <<a href="mailto:shishaozhong@gmail.com" target="_blank">shishaozhong@gmail.com</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"><div dir="ltr"><div dir="ltr"><div dir="ltr">Whenever geospatial functions such as St_intersects or recursive query used, the PostGIS appears to spawn away to many child queries and just obliterate the CPU.  Nothing finishes.<div><br></div><div>That forced me to try out to do the some tasks on the FME server.</div><div><br></div><div>I tried to use this <a href="http://blog.cleverelephant.ca/2010/07/network-walking-in-postgis.html" target="_blank">http://blog.cleverelephant.ca/2010/07/<span>network</span>-walking-in-postgis.html</a> in the PostGIS.</div><div><br></div><div>I tried to linecombiner in FME.  <a href="https://www.safe.com/transformers/line-combiner/" target="_blank">LineCombiner | FME (safe.com)</a>.</div><div><br></div><div>With a large data set, the running of processors were monitored.  It was estimated the PostGIS one would take 16 days to complete.</div><div><br></div><div>But, it only took a few minute to do the same thing in FME.</div><div><br></div><div>This suggests that something is not right with the PostGIS Server.</div><div><br></div><div>Have anyone got experience with configuration and improving perfomance of PostGIS Server?</div><div><br></div><div>Regards,</div><div><br></div><div>David</div></div></div></div>
_______________________________________________<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>
_______________________________________________<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>