3 ms·
Storing images in the database is not a bad thing https://www.sqlite.org/fasterthanfs.html https://www.sqlite.org/fasterthanfs.html
by outcoldman 4y ago
Storing images in the database is not a bad thing https://www.sqlite.org/fasterthanfs.html https://www.sqlite.org/fasterthanfs.html
- soulofmischief 4y agoYour link suggests this is the case for small images, thumbnails, not large images such as that typically produced by SD
- outcoldman 4y agoThat article also points to the paper https://www.microsoft.com/en-us/research/publication/to-blob-or-not-to-blob-large-object-storage-in-a-database-or-a-filesystem/ https://www.microsoft.com/en-us/research/publication/to-blob..., the images produced by stable diffusion are about 500-600Kb in size. At this point it could be a similar performance or could be a little better or a little worse. I am not saying that it is better to store files in SQLite, just saying that nothing wrong with it, if those files are below 1Mb.
- wolrah 4y ago> I am not saying that it is better to store files in SQLite, just saying that nothing wrong with it, if those files are below 1Mb. There is one very obvious thing wrong with it, the fact that those resulting images aren't files that are easily accessible to other things. Unless storing in SQLite actually offers a real advantage in some other way, it's a disadvantage when the output is something you'll want to use with other tools.
- gizmo 4y agoSQLite has also measured the performance impact for storing larger BLOBs: https://www.sqlite.org/intern-v-extern-blob.html https://www.sqlite.org/intern-v-extern-blob.html The verdict: storing blobs in the database is totally fine. Stable diffusion is totally compute bound, the overhead of storing a 1mb file in a sqlite db is miniscule.
- throwntoday 4y agoWill storing thumbnails in a postgres database offer performance improvements as well?