CREATE INDEX Some OGR SQL drivers support creating of attribute indexes. Currently this includes the Shapefile driver. An index accelerates very simple attribute queries of the form fieldname = value, which is what is used by the JOIN capability. To create an attribute index on the nation_id field of the nation table a command like this would be used: CREATE INDEX ON nation USING nation_id
Index Limitations 1. Indexes are not maintained dynamically when new features are added to or removed from a layer. 2. Very long strings (longer than 256 characters?) cannot currently be indexed. 3. To recreate an index it is necessary to drop all indexes on a layer and then recreate all the indexes. 4. Indexes are not used in any complex queries. Currently the only query the will accelerate is a simple "field = value" query. http://gdal.org/ogr/ogr_sql.html On 4/25/12 8:38 PM, "William Kyngesburye" <wokl...@kyngchaos.com> wrote: >Is it possible to index fields in a DBF, and does GDAL support that for a >JOIN? > >----- >William Kyngesburye <kyngchaos*at*kyngchaos*dot*com> >http://www.kyngchaos.com/ > >"Those people who most want to rule people are, ipso-facto, those least >suited to do it." > >- A rule of the universe, from the HitchHiker's Guide to the Galaxy > > >_______________________________________________ >gdal-dev mailing list >gdal-dev@lists.osgeo.org >http://lists.osgeo.org/mailman/listinfo/gdal-dev _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev