[postgis-users] value of spatial index on 300, 000, 000 point geometries

Simon Greener simon at spatialdbadvisor.com
Tue May 5 19:51:58 PDT 2009

>                                                               With 1.4 you could also store
> your points as a geohash, which is pretty compact and can be indexed
> and searched with a b-tree.

I've used point-bucketing and hashing techniques in the past and 1.4 will help those of us 
who like to do this sort of thing, but for simple points (not buckets), is it fair to say, though, 
that the issue for ordinary users is whether this would be hidden behind PostGIS's indexing 
system such that PostGIS would automatically jump between the relevant index type on query?

For multipoints, lines and polygons....

CREATE INDEX bigpolygon_geom ON bigpolygon USING gist (geom);

For points (though existing gist could also be used)....

CREATE INDEX bigpoint_geom ON bigpoing USING geohash (geom);

(geohash might need to take parameters eg for morton key, the grid x and y size).


SpatialDB Advice and Design, Solutions Architecture and Programming,
Oracle Database 10g Administrator Certified Associate; Oracle Database 10g SQL Certified Professional
Oracle Spatial, SQL Server, PostGIS, MySQL, ArcSDE, Manifold GIS, FME, Radius Topology and Studio Specialist.
39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia.
Website: www.spatialdbadvisor.com
  Email: simon at spatialdbadvisor.com
  Voice: +61 362 396397
Mobile: +61 418 396391
Skype: sggreener
Longitude: 147.20515 (147° 12' 18" E)
Latitude: -43.01530 (43° 00' 55" S)

More information about the postgis-users mailing list