[gdal-dev] DBF indexing?

William Kyngesburye woklist at kyngchaos.com
Wed Apr 25 21:13:33 EDT 2012


Cool, I didn't think to look at the shapefile help for DBF info.  Makes sense.

I was able to index the DBF and the join processed in seconds, which was running for hours before without finishing.  Sweet.

On Apr 25, 2012, at 7:53 PM, Frank Warmerdam wrote:

> William,
> 
> Yes, but only in a very restricted fashion.  The shapefile driver docs says:
> 
> """Currently the OGR Shapefile driver only supports attribute indexes
> for looking up specific values in a unique key column. To create an
> attribute index for a column issue an SQL command of the form "CREATE
> INDEX ON tablename USING fieldname". To drop the attribute indexes
> issue a command of the form "DROP INDEX ON tablename". The attribute
> index will accelerate WHERE clause searches of the form "fieldname =
> value". The attribute index is actually stored as a mapinfo format
> index and is not compatible with any other shapefile applications."""
> 
> I think that is still accurate.
> 
> Best regards,
> Frank
> 
> 
> 
> On Wed, Apr 25, 2012 at 5:38 PM, William Kyngesburye
> <woklist at 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/

"History is an illusion caused by the passage of time, and time is an illusion caused by the passage of history."

- Hitchhiker's Guide to the Galaxy




More information about the gdal-dev mailing list