[postgis-tickets] [PostGIS] #3675: Relationship functions not using an index in some cases

PostGIS trac at osgeo.org
Sat Dec 3 11:50:49 PST 2016


#3675: Relationship functions not using an index in some cases
---------------------+---------------------------
 Reporter:  robe     |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  blocker  |  Milestone:  PostGIS 2.3.2
Component:  postgis  |    Version:  2.3.x
 Keywords:           |
---------------------+---------------------------
 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)  );
 }}}

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3675>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list