[postgis-tickets] [PostGIS] #1798: Performance issue with ST_Intersects(geometry, geometry)

PostGIS trac at osgeo.org
Fri Jun 27 14:44:36 PDT 2014


#1798: Performance issue with ST_Intersects(geometry,geometry)
----------------------+-----------------------------------------------------
  Reporter:  nicklas  |       Owner:  pramsey      
      Type:  defect   |      Status:  closed       
  Priority:  medium   |   Milestone:  PostGIS 2.2.0
 Component:  postgis  |     Version:  2.0.x        
Resolution:  invalid  |    Keywords:               
----------------------+-----------------------------------------------------
Changes (by pramsey):

  * status:  reopened => closed
  * resolution:  => invalid


Comment:

 Yes, this ticket is a mess, and I'm closing it out. Please do not re-open,
 open a new clean one with a clean example and reproduction case. I still
 see *no* effect in the intersects_order tests. I also see the opposite
 effect in the point-in-poly tests, st_intersects is much faster, as
 expected.
 {{{
 perf=# \d points
                           Table "public.points"
  Column |   Type   |                      Modifiers
 --------+----------+------------------------------------------------------
  geom   | geometry |
  gid    | integer  | not null default nextval('points_gid_seq'::regclass)
 Indexes:
     "points_pkey" PRIMARY KEY, btree (gid)
     "points_gix" gist (geom)

 perf=# select p.gid, count(*) from polygons p join points t on
 st_intersects(p.geom, t.geom) group by p.gid;
  gid | count
 -----+-------
    1 |  4870
    2 |  6393
 (2 rows)

 Time: 1286.141 ms

 perf=# select p.gid, count(*) from polygons p join points t on
 st_dwithin(p.geom, t.geom, 0) group by p.gid;
  gid | count
 -----+-------
    1 |  4870
    2 |  6393
 (2 rows)

 Time: 11054.843 ms
 }}}

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