gpt4 book ai didi

mysql - 什么时候推荐使用 MySQL BLOB?

转载 作者:IT老高 更新时间:2023-10-28 23:55:06 24 4
gpt4 key购买 nike

我正在编写一个将上传和删除许多文件的应用程序,我通常只是将文件移动到服务器中的一个文件夹中,并使用行唯一 id 命名它们。但据我所知,MySQL 还允许我存储二进制数据(文件),什么时候这是更好的选择?

Please use solid arguments, like When does using BLOB will mean performance improvement?.

P.S:如果重要的话,我正在使用 MyISAM。

谢谢。


更新:

Related questions:
- Storing Images in DB - Yea or Nay?
- To Do or Not to Do: Store Images in a Database (thanks to Sebastian)

更新 2

将文件存储在数据库中是不需要我想知道什么时候这是比存储更好的主意吗它们在文件夹中。

最佳答案

阅读:

其中结论

If you on occasion need to retrieve an image and it has to be available on several different web servers. But I think that's pretty much it.

  • If it doesn't have to be available on several servers, it's always better to put them in the file system.
  • If it has to be available on several servers and there's actually some kind of load in the system, you'll need some kind of distributed storage.

关于mysql - 什么时候推荐使用 MySQL BLOB?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5285857/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com