Changes

Jump to: navigation, search

Performance/Avoid SQLite In Your Next Firefox Feature

261 bytes added, 07:49, 8 April 2014
m
I/O Patterns
* 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
** 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
Confirm
595
edits

Navigation menu