[postgis-tickets] [PostGIS] #3864: Sorting by geometry is slower than sorting by geohash
PostGIS
trac at osgeo.org
Sat Sep 23 02:02:00 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.0
Component: postgis | Version: 2.3.x
Keywords: |
---------------------+---------------------------
```
[local] gis at gis=# create table juno_osm_point_unclustered as (select *
from juno_osm_point ORDER BY osm_id);
SELECT 159446335
Time: 601714,217 ms (10:01,714)
[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 159446335
Time: 1248105,490 ms (20:48,105)
[local] gis at gis=# create table juno_osm_point_pt2 as (select * from
juno_osm_point_unclustered ORDER BY way);
SELECT 159446335
Time: 1287415,365 ms (21:27,415)
```
This may happen as there are some other infrastructure optimizations in
string sorting code, like abbreviated key comparsions.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3864>
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