[postgis-tickets] [PostGIS] #3739: ST_Within Not using index
PostGIS
trac at osgeo.org
Mon Apr 17 13:30:07 PDT 2017
#3739: ST_Within Not using index
--------------------------+---------------------------
Reporter: postgispaul | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.3.3
Component: postgis | Version: 2.3.x
Resolution: | Keywords:
--------------------------+---------------------------
Comment (by postgispaul):
with && it behaves normally:
{{{
Nested Loop (cost=1.12..36813.06 rows=317184 width=229)
Output: s.way
-> Index Scan using planet_osm_polygon_pkey on
public.planet_osm_polygon ap (cost=0.57..2.79 rows=1 width=229)
Output: ap.osm_id, ap.highway, ap.surface, ap.railway,
ap.waterway, ap.tunnel, ap.bridge, ap.oneway, ap.access, ap.name,
ap.z_order, ap.way_area, ap.area, ap.natural, ap.water, ap.admin_level,
ap.boundary, ap.landuse, ap.amenity, ap.parking, ap.a (...)
Index Cond: (ap.osm_id = 123456)
-> Index Scan using planet_osm_polygon_index on
public.planet_osm_polygon s (cost=0.55..36721.72 rows=8855 width=229)
Output: s.osm_id, s.highway, s.surface, s.railway, s.waterway,
s.tunnel, s.bridge, s.oneway, s.access, s.name, s.z_order, s.way_area,
s.area, s.natural, s.water, s.admin_level, s.boundary, s.landuse,
s.amenity, s.parking, s.aeroway, s.military, s (...)
Index Cond: (ap.way && s.way)
Filter: _st_contains(ap.way, s.way)
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3739#comment:7>
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