[postgis-tickets] [PostGIS] #3864: Sorting by geometry is slower than sorting by geohash

PostGIS trac at osgeo.org
Mon Oct 2 06:36:32 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 pramsey):

 I dunno, I decided to profile it and couldn't see any big cpu-eating
 monsters there. I also ran my own timing on my own data (only 200k
 records) and found the direct geom ORDER BY to be slightly faster...
 {{{
 # select gid from (
     select * from roads
     order by geom
     ) a limit 1;

 Time: 1193.123 ms (00:01.230)

 # select gid from (
     select * from roads
     order by ST_GeoHash(ST_Transform(ST_Envelope(geom),4326),10) COLLATE
 "C"
     ) a limit 1;

 Time: 1373.566 ms (00:01.374)
 }}}

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