[postgis-tickets] [PostGIS] #3753: Gist penalty misbehaves if points are inserted in gridded ordered fashion

PostGIS trac at osgeo.org
Thu May 11 20:58:17 PDT 2017


#3753: Gist penalty misbehaves if points are inserted in gridded ordered fashion
----------------------+---------------------------
  Reporter:  komzpa   |      Owner:  robe
      Type:  defect   |     Status:  new
  Priority:  medium   |  Milestone:  PostGIS 2.4.0
 Component:  postgis  |    Version:  2.3.x
Resolution:           |   Keywords:
----------------------+---------------------------

Comment (by robe):

 PostGIS equivalent from Darafei Praliaskouski


 {{{
 create extension if not exists postgis;

 begin transaction;
 SELECT setseed(.43);

 create table dataTable as select ST_MakePoint(x/1000,y/1000) c from
 generate_series(1,1e3,1)x, generate_series(1,1e3,1) y;

 \timing on
 create index idx on dataTable using gist(c);

 select q,(select count(*) from dataTable dt where dt.c && q) from (select
 ST_Expand(ST_MakePoint(x,y), 0.1) q from (select random() x, random() y
 from generate_series(1,1e4,1) s0) s1) s2 ;

 select pg_size_pretty(pg_relation_size('idx'));

 drop table datatable;
 }}}

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