Get the latest tech news

SQLite: 35% Faster Than the Filesystem


ds and writes small blobs (for example, thumbnail images) 35% faster¹ than the same blobs can be read from or written to individual files on disk using fread() or fwrite(). Furthermore, a single SQLite database holding 10-kilobyte blobs uses about 20% less disk space than storing the blobs in individual files.

The --blob-api option on the database read test causes kvtest to use the sqlite3_blob_read() feature of SQLite to load the content of the blobs, rather than running pure SQL statements. The next chart compares SQLite database updates in WAL mode against raw direct-to-disk overwrites of separate files on disk. These settings put SQLite on an equal footing with direct-to-disk writes, which is to say they make the data prone to corruption due to system crashes and power failures.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of filesystem

filesystem