<div dir="ltr"><div>I have a query that runs in <1 second on one machine and 47 seconds on another. The postgres and postgis versions are bascially the same. The database and query are the same. But "explain" is different on the two. The query is below and the graphic output of pgAdmin explain is attached. Obviously, my question is - why the difference?<br>
<br></div>Thanks,<br>Rich<br><br>select pidn, accountno, owner, address, address2, <br>       st_address, descript, wkb_geometry, row_number() OVER (ORDER BY pidn) AS row_number<br>       from ownership_export,<br>    (SELECT <a href="http://special_districts.name">special_districts.name</a>, <br>
      st_buffer(special_districts.wkb_geometry, (-5)::double precision) AS geom, <br>      row_number() OVER (ORDER BY <a href="http://special_districts.name">special_districts.name</a>) AS row_number<br>     FROM special_districts<br>
     WHERE name = 'Teton Village Resort District'<br>    ) as sd_buffer<br>where st_intersects(ownership_export.wkb_geometry, sd_buffer.geom);<br><div><div><br>-- ownership_export is a view: parcel_combined + parcel_attrib<br>
<br><br clear="all"><br>-- <br>Richard Greenwood<br><a href="mailto:richard.greenwood@gmail.com">richard.greenwood@gmail.com</a><br><a href="http://www.greenwoodmap.com">www.greenwoodmap.com</a>
</div></div></div>