[postgis-devel] New node splitting algorithm for GiST

Alexander Korotkov aekorotkov at gmail.com
Sun Jul 1 05:32:43 PDT 2012


On Sat, Jun 30, 2012 at 10:59 PM, Paul Ramsey <pramsey at opengeo.org> wrote:
>
> No progress, still an "item of interest" in my list of things I might
> do. If you prepare a compile-time conditional patch, I'd be interested
> in reviewing and applying it.
>

OK, it's here.
Just an small example. Without patch.

test=# create index geonames_idx on geonames using gist (point);
CREATE INDEX
Time: 113796,848 ms

test=# explain (analyze, buffers) select * from geonames where point &&
'BOX(34.4671 126.631,34.5023 126.667)'::box2d::geometry;

                               QUERY PLAN

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Index Scan using geonames_idx on geonames  (cost=0.00..14.05 rows=2
width=128) (actual time=0.589..0.876 rows=11 loops=1)
   Index Cond: (point &&
'0103000000010000000500000016FBCBEEC93B4140AAF1D24D62A85F4016FBCBEEC93B4140A69BC420B0AA5F40F163CC5D4B404140A69BC420B0AA5F40F163CC5D4B404140AAF1D24D62A85F4016FBCBEEC93B4140AAF1D24D62A85F40'::geometry)
   Buffers: shared hit=26
 Total runtime: 0.927 ms
(4 rows)

With patch.

test=# create index geonames2_idx on geonames2 using gist (point);
CREATE INDEX
Time: 118382,076 ms

test=# explain (analyze, buffers) select * from geonames2 where point &&
'BOX(34.4671 126.631,34.5023 126.667)'::box2d::geometry;


                               QUERY PLAN

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Index Scan using geonames2_idx on geonames2  (cost=0.00..22.40 rows=4
width=128) (actual time=0.209..0.225 rows=11 loops=1)
   Index Cond: (point &&
'0103000000010000000500000016FBCBEEC93B4140AAF1D24D62A85F4016FBCBEEC93B4140A69BC420B0AA5F40F163CC5D4B404140A69BC420B0AA5F40F163CC5D4B404140AAF1D24D62A85F4016FBCBEEC93B4140AAF1D24D62A85F40'::geometry)
   Buffers: shared hit=11
 Total runtime: 0.276 ms
(4 rows)

------
With best regards,
Alexander Korotkov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20120701/c0894322/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: double_sort_split_v1.patch
Type: application/octet-stream
Size: 26494 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20120701/c0894322/attachment.obj>


More information about the postgis-devel mailing list