<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Sep 8, 2025 at 8:34 PM Sebastiaan Couwenberg via postgis-users <<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"> may be a regression in PostGIS 3.5.2, but I'm at a loss on how to confirm and fix that.<br><br></blockquote><div><br></div><div>So, this seems to be a change in planning behaviour primarily, and you have a lot of variability in your upgrade, any piece of which could be implicated:</div><div><br></div><div>- Have you run ANALYZE on the relevant tables?</div><div>- You have a PostgreSQL upgrade from 15 to 17, can you hold your PostGIS version constant while testing PostgreSQL version changes</div><div>- You have a PostGIS upgrade from 3.3 to 3.5, can you hold your PostgreSQL version constant while testing PostGIS version changes</div><div>- Can you check the PostGIS selectivity estimate on the old and the new installations, using </div><div><br></div><div>SELECT  _postgis_selectivity ('nodes', 'geom', ST_GeomFromEWKT('SRID=4326;POLYGON((6.11982 52.6121955,6.11982 53.2038323,7.0927397 53.2038323,7.0927397 52.6121955,6.11982 52.6121955))'), '2');<br></div><div><br></div><div>P</div><div><br></div></div></div>