We are creating an app for a client that has hundreds of megabytes of HTML in SQLite databases. We have implemented a way to query this data and scroll through it all in a r
what options do we have in querying and displaying tens of thousands of rows of data in Android?
You mean besides telling you that reading 20,000+ rows on a 3.5" LCD is bat-guano crazy? ;-)
It looks like CursorWindow
, which is used somewhere under the covers, is having issues managing >17,000 rows. That could be one of two things:
Cursor
holds the entire result set in the heap, that is not out of the question.CursorWindow
only supports 1MB of data, which is what the error message suggests more directly.If there is a logical way to divide your queries into discrete chunks, you could do incremental queries and use CursorJoiner
to stitch them together, and see if that helps.
But, in all seriousness, 20,000+ rows in a 3.5" screen, on a device that most closely resembles a 12-year-old PC in horsepower, is really asking a lot.