什么时候使用MySQL BLOB推荐? [英] When is using MySQL BLOB recommended?

查看:203
本文介绍了什么时候使用MySQL BLOB推荐?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个上传和删除许多文件的应用程序,我通常只是将这些文件移动到服务器中的一个文件夹中,并命名为 id 。但据我了解MySQL也让我存储二进制数据(文件)何时这将是一个更好的选择?


请使用可靠的参数,比如当
使用BLOB将意味着
的性能提升。
$ / b
$ b $ PS我正在使用MyISAM if

谢谢。




更新:
$ b


相关问题

- 在DB中存储图像 - 是或否?

- 做或不做:将图像存储在数据库(感谢塞巴斯蒂安)


更新2

将文件存储在数据库中
不是必需的
我试图知道
是何时呃比储存
他们在文件夹的想法。

解决方案

阅读:





其中结束


有时候需要检索
图片,并且必须在
几个不同的web服务器上可用。但是我认为b $ b就是这么多。
$ b $ ul
如果
不必在几台服务器上可用,最好把
放到文件系统中。

  • 如果
    在多个服务器上可用,而
    实际上在
    系统中有某种负载,则需要某种
    分布式存储。


  • I'm coding an application that will be uploading and deleting many files, i usually just move the files to a folder in the server naming them with the row unique id. But as i understand MySQL also lets me store binary data (files) when would this be a better choice?.

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

    P.S: I'm using MyISAM if that matters.

    Thanks.


    UPDATE:

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

    UPDATE 2

    Storing the files in the database is not a need i'm trying to know when is this a better idea than storing them in folders.

    解决方案

    Read:

    which concludes

    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 BLOB推荐?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆