5 ms·
will you store large objects like images or audio file directly in SQL?
by geokon 7y ago
will you store large objects like images or audio file directly in SQL?
- bob1029 7y agoIn most cases I will. Pulling a blob out of a row is a lot faster than opening an additional file handle. There aren't really any downsides to this either unless you are running table scans. SQLite does support indexes (even full-text) and they do work miracles so do use them when necessary. I would go so far as to argue that SQLite could be used to store all of the assets for any large piece of software (I.e. a AAA game). This would probably wind up faster and more reliable than most alternative solutions out there today.
- bsenftner 7y agoCan confirm SQlite is used in AAA game engines as well as VFX production pipelines. I know because I put it there.
- solarkraft 7y agoSo - is SQlite a good file system? Should I just use it for everything?
- bob1029 7y agoI think hard drive manufacturers should just embed SQLite directly into their devices and optimize the SQLite VFS implementation to be flash aware at the controller-level. Who needs a file system when your disks speak SQL?
- nomadluap 7y agoSQLite has a page measuring performance of internal blobs vs external files: https://www.sqlite.org/intern-v-extern-blob.html https://www.sqlite.org/intern-v-extern-blob.html