3 ms·
One caveat: if the blobs (e.g. images) in the DBs are static, and transactions are read only/writes happen infrequently, then having all your blobs in one SQLit
by knighthack 2y ago
One caveat: if the blobs (e.g. images) in the DBs are static, and transactions are read only/writes happen infrequently, then having all your blobs in one SQLite DB makes for an insanely easy backup strategy, compared to having thousands of smaller files on the filesystem.
And it only requires two tables - one table for blob storage with an indexable column; and another table where you're storing the metadata associated to the rows in the blob table.
For a small number of users and simple apps, it can be an ideal solution. I know, because I've tried.
---
This is an interesting read from the official site as well - '35% Faster Than The Filesystem' / https://sqlite.com/fasterthanfs.html https://sqlite.com/fasterthanfs.html
- Repulsion9513 2y ago> if the blobs (e.g. images) in the DBs are static, and transactions are read only/writes happen infrequently, then having all your blobs in one SQLite DB makes for an insanely easy backup strategy Does it? Suddenly instead of just backing up the whole database you have to do delta backups which can make it quite a bit more difficult...
- gfv 2y agoYou can use streaming WALs, like Litestream does. It is a pretty simple way to do incremental backups.