Opened 8 years ago

Last modified 8 years ago

#3524 closed defect

Getting distance between united States and Russia in geography hangs up the server — at Version 1

Reported by: robe Owned by: pramsey
Priority: high Milestone: PostGIS 2.2.3
Component: postgis Version: 2.2.x
Keywords: Cc:

Description (last modified by robe)

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 of 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.

Change History (2)

by robe, 8 years ago

Attachment: ur_test.sql added

comment:1 by robe, 8 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.