Querying spatial data using spatialite with indexes