[postgis-tickets] [PostGIS] #3864: Sorting by geometry is slower than sorting by geohash
PostGIS
trac at osgeo.org
Sat Sep 30 04:38:25 PDT 2017
#3864: Sorting by geometry is slower than sorting by geohash
----------------------+---------------------------
Reporter: komzpa | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.4.1
Component: postgis | Version: 2.3.x
Resolution: | Keywords:
----------------------+---------------------------
Comment (by komzpa):
{{{
[local] gis at gis=# create table juno_osm_point_unclustered as (select *
[more] ( > from juno_osm_point ORDER BY osm_id);
SELECT 159843185
Time: 768781,686 ms (12:48,782)
[local] gis at gis=# create table juno_osm_point_pt1 as (select * from
juno_osm_point_unclustered ORDER BY
ST_GeoHash(ST_Transform(ST_Envelope(way),4326),10) COLLATE "C");
SELECT 159843185
Time: 1223812,285 ms (20:23,812)
[local] gis at gis=# create table juno_osm_point_pt2 as (select * from
juno_osm_point_unclustered ORDER BY way);
ERROR: 57014: canceling statement due to user request
LOCATION: ProcessInterrupts, postgres.c:2999
Time: 932325,460 ms (15:32,325)
-- here postgres ate 140GB of my 128 GB machine so I cancelled it.
[local] gis at gis=# create table juno_osm_point_pt3 as (select * from
juno_osm_point_unclustered ORDER BY way::bytea);
SELECT 159843185
Time: 1055460,975 ms (17:35,461)
-- this can be used as reasonable performance estimator
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3864#comment:9>
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