Changes

Jump to: navigation, search

Performance/Avoid SQLite In Your Next Firefox Feature

123 bytes added, 22:12, 20 March 2014
I/O Patterns
=== I/O Patterns ===
* Your database file can suffer from logical/internal fragmentation due to I/O common SQL patterns ** e.g. if there is a pattern of interleaved writes Eg appending data to columns with indexes causes interleaved index and table data, parts of each will end up scattered all over . This means both table and index scans are non-sequential until a VACUUM is performed. ** Appending data to multiple tables interleaves tables too.** Deleting data does not shrink the database file, and queries will not be able to do sequential I/Ojust marks pages as unused.
* Physical/external fragmentation can also happen due to SQLite using inappropriate defaults
** e.g. the factory-default SQLite [http://www.sqlite.org/pragma.html#pragma_page_size page size] is 1024 bytes. When the default page size was changed to 32KB in {{bug|416330}}, there was a [http://taras.glek.net/blog/2013/06/28/new-performance-people/ 4x reduction in SQLite IO waits] according to Telemetry
Confirm
381
edits

Navigation menu