News for hackers. Stuff that matters.
Re:SQLite small blob storage: 35% Faster Than the Filesystem by copenja on Wednesday June 14, 2017 @01:54AM (#14550882)
I mean, is SQLite not also using the filesystem? Maybe I'm confused here. Seems like saying using C is 15% faster than ASM. But that includes user error, right?
Re:SQLite small blob storage: 35% Faster Than the Filesystem by mcpherrinm on Wednesday June 14, 2017 @01:58AM (#14550893)
The article is basically entirely an answer to that question.

The third sentence in particular is:

The performance difference arises (we believe) because when working from an SQLite database, the open() and close() system calls are invoked only once, whereas open() and close() are invoked once for each blob when using blobs stored in individual files. It appears that the overhead of calling open() and close() is greater than the overhead of using the database. The size reduction arises from the fact that individual files are padded out to the next multiple of the filesystem block size, whereas the blobs are packed more tightly into an SQLite database.

Re:SQLite small blob storage: 35% Faster Than the Filesystem by copenja on Wednesday June 14, 2017 @02:18AM (#14550950)
The advice to use a single open/close call instead of multiple is great, but that is advice on how to effectively use the filesystem. It isn't in anyway, shape, or form beating the filesystem.
Re:SQLite small blob storage: 35% Faster Than the Filesystem by jdmichal on Wednesday June 14, 2017 @05:07PM (#14556130)
You can't use a single open/close call to write multiple BLOBs, unless you are concatenating them into one file. That's not typically what happens nor what people are advocating when they recommend not using database BLOBs and using the filesystem instead.
Re:SQLite small blob storage: 35% Faster Than the Filesystem by subway on Wednesday June 14, 2017 @01:58AM (#14550892)
3rd paragraph

The performance difference arises (we believe) because when working from an SQLite database, the open() and close() system calls are invoked only once, whereas open() and close() are invoked once for each blob when using blobs stored in individual files. It appears that the overhead of calling open() and close() is greater than the overhead of using the database.