I tried to simplify my situation as much as possible, so it doesn't look too real, sorry. But it is based on a real concern.
Let's imagine I have a small Android application that is showing user the current temperature. The temperature is changing every second and the application is working all the time.
Also the app has an "audit" DB table:
CREATE TABLE TemperatureAudit (
secondsFrom1970 INTEGER not null,
temperature INTEGER not null);
After a year of this application working the audit table will be quite large. And let's imagine I don't want to truncate it if it's not really necessary.
So the question for those who know how sqlite working on Android: should I worry?
SQLite loads the metadata of all tables, but it does not load any actual data that is not needed.
All accesses to the database are done through pages, which have a size of a few KB; any page not currently being used is not required to be in memory. So scanning through a table requires very little memory.