Re: [sqlite] Knowing when not to use a R-Tree index, and clustering tables along spatial indexes

2018-01-01 Thread Andrea Aime
On Mon, Jan 1, 2018 at 10:45 AM, Clemens Ladisch wrote: > Wolfgang Enzinger wrote: > > First, query the overall extent of your data, like this: > > SELECT MIN(mingx),MAX(maxgx),MIN(mingy),MAX(maxgy) FROM > flst_shape_index; > > This results in a full table scan. Instead of

[sqlite] Knowing when not to use a R-Tree index, and clustering tables along spatial indexes

2017-12-29 Thread Andrea Aime
Hi, I'm writing some software that can read data off GeoPackage (SQLite + rtree + standardized set of metadata tables) as an alternative format for spatial databases, like PostgreSql with the PostGIS extension. Now, when I use PostGIS the query plan optimizer checks the bbox provided in the query