SpatialIndex query performance

46 Views Asked by At

I would like to retrieve the name of each geometry where name starts with “tesla” and geometry found within a specific area.

Is there a better way to do it using SQLite with mod_spatialite?

SELECT name FROM cars
 WHERE name LIKE 'tesla%' AND ROWID IN (
  SELECT ROWID FROM SpatialIndex
  WHERE f_table_name = 'cars' AND
    search_frame = BuildMbr(11.8, 43.4, 11.9, 43.5)
 );

`

0

There are 0 best solutions below