0

i am using a Cursor to query SQLite database in my android application. But cursor size is limited to 4 MB i suppose. (I have 6 blob columns in a row and each one of them is nearly 1.5 MBs so it is 9MBs in total.)

Is there a way to increase the maximum size of this cursor or should i seperate the columns in a single row in order to lower the size of a single row?

Thank you for your answers.

Emre Turan
  • 83
  • 1
  • 8

1 Answers1

0

Is there a way to increase the size of WindowCursor in Android Studio?

Yes, one of it's constructors takes a long for the number of bytes i.e.

public CursorWindow (String name, long windowSizeBytes)

Is there a way to increase the maximum size of this cursor or should i seperate the columns in a single row in order to lower the size of a single row?

Not with the available methods (a Cursor uses CursorWindows and hence the difference).

However, the recommended approach is to not store such large amounts of data in the database, but to store the data as a file and instead store a reference (e.g. the file's path) to the file where the data is stored.

  • You might find this and some of the links informative
MikeT
  • 51,415
  • 16
  • 49
  • 68