What are the advantages/disadvantages to storing small binary blobs directly in MySQL. I’ve read mixed opinions on the topic.. some say a lot of performance can be gained if large blocks of text are zipped and stored as binary or is it faster to use the filesystem?
What are the advantages/disadvantages to storing small binary blobs directly in MySQL. I’ve read
Share
If you have entities in the database, and corresponding files associated with those entities in the filesystem, there’s nothing preventing them from getting out of sync (deleting an entity from the DB but not cleaning up the files, etc. It also means backing up the database must happen at the same time as backing up the filesystem.
I used to feel that BLOBs in the database created fragmentation and can slow down reads when that data isn’t needed, but you can get around that by putting the BLOB in a parallel table, so you only read it when it’s needed.