What is difference between storing data in a blob, vs. storing a pointer to a file?

后端 未结 5 1041
醉酒成梦
醉酒成梦 2020-12-13 00:54

I have a question about the blob data type in MySQL.

I read that the data type can be used to store files. I also read that an alternative is to store

5条回答
  •  遥遥无期
    2020-12-13 01:39

    Filesystem access will be faster than through the database. Blobs columns have some disadvantages in terms of indexing/sorting etc, which you could do with your filename column if you wished to in the future.

    The database can also grow quickly with large blobs and then tasks like backing up become slower. I would go with a file location in database with the physical storage on the file system.

提交回复
热议问题