attribute index on shapefiles
Frank Warmerdam
warmerdam at POBOX.COM
Thu Apr 19 11:45:34 PDT 2007
Travis Kirstine wrote:
> I have created indexes on several shpfiles using ogr with the -sql
> command CREATE INDEX ON table USING fieldname. Currently the shpfiles
> are referenced by a tileindex using TILEINDEX/TILEITEM in the mapfile.
> When performing a query by attribute on the indexed field does
> mapserver make use of the index?
Travis,
I believe the attribute filter is still "set" on each shapefile in turn
by the code in mapogr.cpp so the answer should be yes. I'd warn that
the attribute filtering is only passed off to OGR in some circumstances,
such as when the filter clause starts with the WHERE keyword. Old style
filters are evaluated entirely within MapServer instead of OGR and won't
benefit from the indexes even though you are using CONNECTIONTYPE OGR.
Hopefully the OGR howto touches on this issue.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the MapServer-users
mailing list