dimanche 5 avril 2015

How to improve the search efficiency of SQLite database?

I have a sqlite database for saving some map data cached from the internet. I choose sqlite because it's portable and serverless. For each map tile, it contains the following information:



x, y, zoom, type, image


So my table has them as the 5 columns. I use the call



SELECT image WHERE x = ... AND y=... AND zoom=... AND type =...


However, as the database becomes larger (more than 15000 rows), the query speed becomes very slow (>1 seconds on average).


How could I make it faster?


Aucun commentaire:

Enregistrer un commentaire