'Flutter | Row too big to fit into CursorWindow
I'm developping a flutter app and I use standard SQLite database to store information from sensors. I'm getting the error:
E/SQLiteQuery(11895): exception: Row too big to fit into CursorWindow requiredPos=0, totalRows=3; query: SELECT sessionId, deviceId, startDate, endDate, ... , timestamp FROM sessions
E/flutter (11895): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: DatabaseException(Row too big to fit into CursorWindow requiredPos=0, totalRows=3) sql 'SELECT sessionId, deviceId, startDate, endDate, ..., timestamp FROM sessions'}
While I'm trying to read data saved in a table "sessions" with a large content.
5 sensors of 3 dim array, every 100ms, during 30min, but could be more ... > 300 000 numeric data per session (Up to 10Mo).
How to avoid this 'row to big' of error ?
Solution 1:[1]
The error message Row too big to fit into CursorWindow requiredPos=0, totalRows=3; query: SELECT sessionId, deviceId, startDate, endDate, ... , timestamp FROM sessions points that you're trying to fit the rows on a CursorWindow. Last time I recall CursorWindow (buffer) has 2Mb available.
One way to circumvent this issue is by reducing the columns used in the query. You may also want to keep track of the stored data to be extracted, to avoid surpassing the CursorWindow limit.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Omatt |
