[postgis-tickets] [PostGIS] #3524: ST_Distance for geography should be cancellable

PostGIS trac at osgeo.org
Mon Apr 11 12:23:53 PDT 2016


#3524: ST_Distance for geography should be cancellable
----------------------+---------------------------
  Reporter:  robe     |      Owner:  pramsey
      Type:  defect   |     Status:  new
  Priority:  high     |  Milestone:  PostGIS 2.1.9
 Component:  postgis  |    Version:  2.2.x
Resolution:           |   Keywords:
----------------------+---------------------------

Comment (by pramsey):

 So, "yes" to interruptible, I'll do that right away. It's easy to see why
 it takes forever: with the first, uncached call happening in the "brute
 force" algorithm, you get 36K x 36K edge-edge distance calculations, which
 is... a lot 1.2B. So it takes a while. Running the tree-based calculation,
 I get a result in a under a second (and that's with four calculations!):
 {{{
 postgis23=# select _st_distancetree(a.geog, b.geog) from ur_test_g a,
 ur_test_g b;
  _st_distancetree
 ------------------
                 0
    3987.916904757
    3987.916904757
                 0
 (4 rows)

 Time: 801.691 ms
 }}}
 So that maybe argues for forgoing the brute force calculation altogether
 and just using the tree every time. (Although we have other tickets that
 still show failure cases in the tree, compared to the brute force, in
 terms of correct results.)

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3524#comment:5>
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