The following query will likely be much faster: ~~~~~ SELECT (SELECT min(zoom_level) FROM tiles), (SELECT max(zoom_level) FROM tiles); ~~~~~ The current SQLite query planner is not clever enough to convert your original query into the fast equivalent.