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

PostGIS trac at osgeo.org
Fri Jul 5 04:33:29 PDT 2013


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

Comment(by robe):

 On my 2.1.0beta3 install there is a difference but not that noticable

 Here is run on my windows 2008 R2 64-bit vm - PostgreSQL 9.2.4, compiled
 by Visual C++ build 1600, 64-bit POSTGIS="2.1.0beta3dev r11482" GEOS="3.4
 .0dev-CAPI-1.8.0 r0" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.0,
 released 2013/04/24" LIBXML="2.7.8" LIBJSON="UNKNOWN" RASTER
 {{{
 -- 6126 ms, 5971 ms, 5921 ms
 SELECT COUNT(*) FROM intersects_order t1, intersects_order t2
 WHERE ST_Intersects(t1.geom, t2.geom);

 -- count: 5131

 -- 6040 ms, 5912 ms, 5902 ms
 SELECT COUNT(*) FROM intersects_order t1, intersects_order t2
  WHERE ST_Intersects(t2.geom, t1.geom);

 -- count: 5131

 -- ST_DWithin - 4991 ms, 4971 ms
 SELECT COUNT(*) FROM intersects_order t1, intersects_order t2
 WHERE ST_DWithin(t1.geom, t2.geom,0);

 -- count: 5131

 }}}

 But yah ST_DWithin is noticeably faster :)

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