My SQLite database stores location data as latitude
and longitude
values. I will frequently have to query the database using the following query:
SELECT * FROM locations WHERE latitude > 22.2 && latitude < 22.3 && longitude > 50.7 && longitude < 50.8
Would a multi-column index on the latitude
and then the longitude
help to speed up the queries? This answer provides the way the query can be carried out with a multi-column index, but the comment accompanying it mentions that it will not work in SQLite.