[gdal-dev] SQLite driver hit and miss with spatial index

jratike80 jukka.rahkonen at maanmittauslaitos.fi
Thu Apr 6 12:59:26 PDT 2017

Frederik Ramm wrote
> Hi,
>    while what I wrote in the previous post is still interesting and a
> bit strange, I have meanwhile upgraded to GDAL 2 packages from the
> ubuntugis-unstable repository for Xenial, and now the behaviour is as I
> would expect it: The ogr2ogr -spat command *with* indexes takes
> practically no time (0.05 seconds), and the -spat command *without*
> index takes about 40 seconds as before.
> Sorry for the noise then.
> Bye
> Frederik

Hi Frederik,

Did you also notice that your no-index.sqlite database is not a SpatiaLite
database but a SQLite db with FDO geometries? You can check it with ogrinfo:

ogrinfo no-index.sqlite -sql "select CheckSpatialMetadata()"

The return values are explained in the Spatilite SQL reference

I do not know how FDO vs. Spatialite speeds differ in non-indexed searches
but I guess you prefer making controlled tests by change only one thing at a

-Jukka Rahkonen-

View this message in context: http://osgeo-org.1560.x6.nabble.com/gdal-dev-SQLite-driver-hit-and-miss-with-spatial-index-tp5316090p5316200.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.

More information about the gdal-dev mailing list