[postgis-users] Can I build an index on combined non-spatial &spatial columns?
kemal at cins.co.uk
Wed Mar 18 03:36:48 PDT 2009
I don't know about combining indexes but you want to include a spatial
operator such as && in addition to Distance so that you can take advantage
of an index on "the_geom".
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On
> Behalf Of M.A. (Thijs) van den Berg
> Sent: 18 March 2009 11:57
> To: postgis-users at postgis.refractions.net
> Subject: [postgis-users] Can I build an index on combined
> non-spatial &spatial columns?
> Suppose I want to speedup the following type of queries with
> an index:
> SELECT the_geom, building_name
> FROM buildings
> WHERE Distance(the_geom, 'POINT(100312 102312)') < 5000
> AND building_type = 'School'
> Is that possible, and if not, why not? My current option is
> to write my own index storage in C++, using a hashmap to
> filter building_type, and build separate spatial indices for
> each building type. Can I do something similar in postgresql?
> Would my only option be to split the building_types into
> separate tables?
> postgis-users mailing list
> postgis-users at postgis.refractions.net
More information about the postgis-users