[postgis-tickets] [PostGIS] #3739: ST_Within Not using index
PostGIS
trac at osgeo.org
Sun Apr 30 05:40:48 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):
Total costs without enable_seqscan=false: 193474644
with enable_seqscan=false: 475346571
{{{
Nested Loop (cost=6230.89..475346571.95 rows=227104 width=271)
Output: (ap.tags -> 'ISO3166-1'::text), s.admin_level, s.way, s.osm_id
-> Index Scan using polygon_iso3166_1_idx on public.planet_osm_polygon
ap (cost=0.28..1473.02 rows=1328 width=258)
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.tags -> 'ISO3166-1'::text) = 'KR'::text)
-> Bitmap Heap Scan on public.planet_osm_polygon s
(cost=6230.62..357938.45 rows=171 width=239)
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 (...)
Recheck Cond: (ap.way ~ s.way)
Filter: ((s.admin_level ~ '^\d+$'::text) AND _st_contains(ap.way,
s.way))
-> Bitmap Index Scan on planet_osm_polygon_index
(cost=0.00..6230.57 rows=265635 width=0)
Index Cond: (ap.way ~ s.way)
}}}
with extra ~ condition: 486830
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3739#comment:23>
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