[postgis-devel] [PostGIS] #1841: ST_Distance on PostGIS 2.0 is prohibitively slow

PostGIS trac at osgeo.org
Wed May 23 12:40:32 PDT 2012


#1841: ST_Distance on PostGIS 2.0 is prohibitively slow
--------------------------------+-------------------------------------------
 Reporter:  andrewxhill         |       Owner:  pramsey      
     Type:  enhancement         |      Status:  new          
 Priority:  medium              |   Milestone:  PostGIS 2.1.0
Component:  postgis             |     Version:  2.0.x        
 Keywords:  st_distance, speed  |  
--------------------------------+-------------------------------------------

Comment(by nicklas):

 Hmm, is this really slow?

 This is more than 190000 pairwise distance-calculations. If the run-time
 is 6 minutes, 360000 ms it is about 2 ms per pair. With, in average 625
 points in each polygon, I am not sure it is very slow.

 If it would have been a brute force algorithm every distance pair would
 need 390000 vertex-combinations and almost as many edge-vertex
 combinations to compute.

 I do not have any PostGIS 1.4 installed to time brute force version, but I
 suspect it will be quite a lot slower.

 And I did it in 190000 ms, I love ssd :-)

 /Nicklas

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1841#comment:4>
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-devel mailing list