Could not allocate CursorWindow
Android cursors read all the query results into memory, and have a limit of 1 MB for that data.
This limit was chosen because this amount of data is likely to make your app run sluggishly on a mobile device.
You should, if possible:
- do the computations not in your code but in SQL;
- query only the data that you need (i.e., do not use
SELECT *
but get only the columns you need, and use aWHERE
filter); - read the data in smaller portions.