id summary reporter owner description type status priority milestone component version resolution keywords cc 3675 Relationship functions not using an index in some cases robe robe "As noted in https://lists.osgeo.org/pipermail/postgis-users/2016-December/041779.html The spatial index usage doesn't seem to kick in at least in PostgreSQL 9.6 2.3 (I have checked 9.5 with 2.3, but 9.5 2.2 is fine). The issue only arises when you use a longitude / latitude from a table. As I noted in email: https://lists.osgeo.org/pipermail/postgis-users/2016-December/041789.html Spatial index kicks in for common cases of: {{{ SELECT e.gid FROM e1 , e2 WHERE ST_Intersects(e1.geom, e2.geom); SELECT e.gid FROM e1 WHERE ST_Intersects(e1.geom, ST_SetSRID(ST_MakePoint(-10, 30),4326) ); }}} But doesn't in case where longitude and latitude are coming from a table {{{ SELECT e.gid FROM e1 , e2 WHERE ST_Intersects(e1.geom, ST_SetSRID(ST_MakePoint(e2.longitude, e2.latitude),4326) ); }}} " defect closed blocker PostGIS 2.3.2 postgis 2.3.x fixed