[postgis-tickets] [PostGIS] #3524: Getting distance between united States and Russia in geography hangs up the server
PostGIS
trac at osgeo.org
Sat Apr 9 09:02:00 PDT 2016
#3524: Getting distance between united States and Russia in geography hangs up the
server
---------------------+---------------------------
Reporter: robe | Owner: pramsey
Type: defect | Status: new
Priority: high | Milestone: PostGIS 2.1.9
Component: postgis | Version: 2.2.x
Keywords: |
---------------------+---------------------------
My server seems pretty frozen computing these and it's still trying to
compute the distance between these two countries and it's been 15 minutes
already.
After about 17 minutes or waiting I decided to just cancel the query and
the query would not cancel even after 7 minutes of waiting. Then I tried
to pg_terminate_backend it, and that still did not work. So I had to
finally end up killing my service entirely.
I know they are big but really? I should at least be able to cancel.
We were testing on 2.2.1, but decided to also test on 2.1.8 (postgresql
9.4). Same issue on both.
Us has 36054 points and Russia has 36352
Query is as follows:
{{{
SELECT ST_Distance(a.geog, b.geog)
FROM (SELECT geom::geography As geog, ST_NPoints(geom) As npoints FROM
ur_test WHERE name = 'United States') AS a
, (SELECT geom::geography AS geog, ST_NPoints(geom) As npoints FROM
ur_test WHERE name = 'Russia') AS b
}}}
Casting to geography is quick. Doing distance on geometry I think was
about 2 seconds.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3524>
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