Confirmed users
595
edits
m (→Memory Usage) |
m (→I/O Patterns) |
||
Line 29: | Line 29: | ||
* Performance can [http://sqlite.1065341.n5.nabble.com/Coping-with-database-growth-fragmentation-td44781.html#a44782 significantly degenerate over time]; scheduling periodic [https://sqlite.org/lang_vacuum.html rebuilds of the DB] is necessary. | * Performance can [http://sqlite.1065341.n5.nabble.com/Coping-with-database-growth-fragmentation-td44781.html#a44782 significantly degenerate over time]; scheduling periodic [https://sqlite.org/lang_vacuum.html rebuilds of the DB] is necessary. | ||
** Note that this "vacuuming" only deals with internal fragmentation, not the external [filesystem] fragmentation | ** Note that this "vacuuming" only deals with internal fragmentation, not the external [filesystem] fragmentation | ||
* SQLite uses fsync's to guarantee transaction durability and enable recovery from crashes. fsyncs can be very expensive, and happen relatively frequently in the default rollback-journal mode. This performance/reliability trade-off might not be necessary for simple storage needs. | ** VACUUM empties the free pages space of the database file, that means after a vacuum, until there's new free space, inserts will be a little bit more expensive cause they will have to grow the file | ||
* SQLite uses fsync's to guarantee transaction durability and enable recovery from crashes. fsyncs can be very expensive, and happen relatively frequently in the default rollback-journal mode. This performance/reliability trade-off might not be necessary for simple storage needs, especially if the important data can be rebuilt at any time. | |||
* JSON files or log files will show better I/O patterns almost every time, especially if they're compressed and read/written in entirety each time | * JSON files or log files will show better I/O patterns almost every time, especially if they're compressed and read/written in entirety each time | ||