This link was posted by yla92 1 hour ago on HN. It received 132 points and 25 comments.
Something to think about if your program is reading and writing data. Why use a home grown storage setup instead of a database?
General Findings
SQLite is competitive with, and usually faster than, blobs stored in separate files on disk, for both reading and writing.
SQLite is much faster than direct writes to disk on Windows when anti-virus protection is turned on. Since anti-virus software is and should be on by default in Windows, that means that SQLite is generally much faster than direct disk writes on Windows.
Reading is about an order of magnitude faster than writing, for all systems and for both SQLite and direct-to-disk I/O.
I/O performance varies widely depending on operating system and hardware. Make your own measurements before drawing conclusions.
Some other SQL database engines advise developers to store blobs in separate files and then store the filename in the database. In that case, where the database must first be consulted to find the filename before opening and reading the file, simply storing the entire blob in the database gives much faster read and write performance with SQLite. See the Internal Versus External BLOBs article for more information.
reply