Jér*_*émy 5 sqlite large-data dart flutter
我正在开发一个 flutter 应用程序,我使用标准的 SQLite 数据库来存储来自传感器的信息。我收到错误:
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'}
Run Code Online (Sandbox Code Playgroud)
当我试图读取保存在包含大量内容的“会话”表中的数据时。
3 个暗淡阵列的 5 个传感器,每 100 毫秒,在 30 分钟内,但可能更多... > 300 000每次会话的数字数据(最多 10 个月)。
如何避免这种“行到大”的错误?
该错误消息Row too big to fit into CursorWindow requiredPos=0, totalRows=3; query: SELECT sessionId, deviceId, startDate, endDate, ... , timestamp FROM sessions表明您正在尝试调整 CursorWindow 上的行。上次我记得 CursorWindow(缓冲区)有 2Mb 可用。
避免此问题的一种方法是减少查询中使用的列。您可能还想跟踪要提取的存储数据,以避免超出 CursorWindow 限制。
| 归档时间: |
|
| 查看次数: |
1173 次 |
| 最近记录: |