Window is full
I'm getting theese messages when fetching about 40k rows from db.
Window is full: requested allocation 17 bytes, free space 16 bytes, window size 2097152 bytes
If I do another full outer join(for testing) on 16 rows I get a crash. Looking at the source I dodn't find a way to increase it's size beyond 2MB. Can you please add the option?
This may not be an option for you, but in my experience with sqlite-android and large objects coming back from the database, chunking is the way. This was our solution for large Strings (JSON models) - https://github.com/ankidroid/Anki-Android/commit/572ecf4465b5541d727e5363f9795d182b5b9c8d - and for large numbers of rows maybe you could load in rows in chunks with rowlimit and offsets or similar. As a brainstorm on a temporary workaround at least.
The part of the code that loads the data doesn't control what query it's executing, so I can't just add paging. My resulting data structuries in memory from each row are very small in the end. If I can hold them in memory, I should be able to load them. Why not just add a option to change window size in requery db configuration.
Also would it be possible to implement a Cursor that doesn't use CursorWindow and just reads the rows directly from sqlite one-way? This way it will be less overhead and no buffering problems.
I was wondering exactly the same question as you. I'd be happy to know whether there is an easy answer about a configuration option to change the window side and deal with request having a large row.