[postgis-tickets] [PostGIS] #3065: Spatial index on LINESTRING not used under some circumstances

PostGIS trac at osgeo.org
Mon Mar 16 08:44:13 PDT 2015


#3065: Spatial index on LINESTRING not used under some circumstances
---------------------------+------------------------------------------------
 Reporter:  realityexists  |       Owner:  pramsey
     Type:  defect         |      Status:  new    
 Priority:  medium         |   Milestone:         
Component:  postgis        |     Version:  2.1.x  
 Keywords:                 |  
---------------------------+------------------------------------------------

Comment(by strk):

 I cannot reproduce the problem here:
  PostgreSQL 9.3.6 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu
 4.8.2-19ubuntu1) 4.8.2, 64-bit
 POSTGIS="2.2.0dev r13327" GEOS="3.5.0dev-CAPI-1.9.0 r4038" PROJ="Rel.
 4.8.0, 6 March 2012" GDAL="GDAL 1.11.1, released 2014/09/24"
 LIBXML="2.9.1" LIBJSON="0.12" RASTER

 I've run the preparation and the query in your original submission, and
 got the index scan:
 ```
                                                    QUERY PLAN
 ----------------------------------------------------------------------------------------------------------------
  Nested Loop  (cost=0.14..585.98 rows=328 width=8) (actual
 time=0.003..0.003 rows=0 loops=1)
    ->  Seq Scan on test_poly a  (cost=0.00..22.30 rows=1230 width=36)
 (actual time=0.001..0.001 rows=0 loops=1)
    ->  Index Scan using ix__temp_line_line on _temp_line s
 (cost=0.14..0.45 rows=1 width=36) (never executed)
          Index Cond: (a.border && line)
          Filter: (_st_distance(a.border, line, 0::double precision, false)
 < 1e-05::double precision)
  Total runtime: 0.058 ms
 (6 rows)
 ```

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/3065#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