[fdo-users] RE: SQLite - Does it make sense to add attribute indices?

Traian Stanev traian.stanev at autodesk.com
Sat Sep 20 16:39:47 EDT 2008

Hi Jason,

The provider will also apply the attribute filter, on features that pass the spatial filter.

However, I am not sure whether it will take advantage of any index on the attribute being filtered, because I don't know how capable the SQLite query parser is. When you do a spatial query, you are effectively already using one index (the implicit RowId index) so it will probably not use the attribute index at the same time -- but this needs to be checked by examining the bytecode.

Also keep in mind that the attribute filter will be evaluated internally by the provider, using the SQLite engine, which is somewhat more permissive about data types (so you can treat string columns as integers, etc). I have not measured the speed difference between evaluating the filter on the provider side and evaluating on the MG side.


> -----Original Message-----
> From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-
> bounces at lists.osgeo.org] On Behalf Of Jason Birch
> Sent: Friday, September 19, 2008 4:23 PM
> To: FDO Users Mail List
> Subject: [fdo-users] SQLite - Does it make sense to add attribute
> indices?
> I've been considering manually adding some attribute indices to my
> SQLite files to see if it will allow things like attribute-constrained
> layers (like a roads layer where only highways should be displayed) to
> be more efficient.
> Does anyone (and by anyone, I guess I mean Traian) know whether
> attributes will be taken into consideration by the SQLite provider for
> standard MapGuide calls, or if it will always just apply the spatial
> index because of the omnipresent bounding box in MapGuide queries?
> Jason
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users

More information about the fdo-users mailing list