3 ms·
> What about mixed delete/write/read workloads? The source code to the test program is part of the SQLite source tree. It should be fairly easy to modify it to
by wyoung2 9y ago
> What about mixed delete/write/read workloads?
The source code to the test program is part of the SQLite source tree. It should be fairly easy to modify it to test the scheme you have in mind.
> How well does SQLite deal with fragmentation?
SQLite operates a lot like a modern filesystem: tree-based indexing structures, writes go to empty spaces, deletes leave holes that may later be filled by inserts, etc.
SQLite has active mechanisms to reduce fragmentation on the fly: b-tree page defragmentation (https://www.sqlite.org/fileformat.html https://www.sqlite.org/fileformat.html) and auto-vaccuum (https://www.sqlite.org/pragma.html#pragma_auto_vacuum https://www.sqlite.org/pragma.html#pragma_auto_vacuum) being the main ones. If the DB file gets too fragmented, you can run a manual VACCUM (https://www.sqlite.org/lang_vacuum.html https://www.sqlite.org/lang_vacuum.html) on it.
- YZF 9y agoSounds good. I might give it a test in our product to replace some file based storage scheme.