将图像存储在数据库中的缺点? [英] Disadvantages of storing images in a Database?

查看:206
本文介绍了将图像存储在数据库中的缺点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁能告诉我在MySQL数据库中存储图像的缺点?

它不如在服务器上存储图像那么高效吗?图像下载与磁盘存储相比需要更长的时间,是否会对数据库造成沉重负担?感谢帮助!

Can anyone please tell me the disadvantages of storing images in a MySQL database?
Is it not as efficient as storing the images on the server? Will it take longer for the images to download vs disk storage and will it put heavy load on the database? Appreciate the help!

推荐答案

将图像存储在磁盘上的一个好处是,您可以通过快速网络直接提供服务服务器(nginx),它根本不需要你的代码。
另一个是你可以在以后更轻松地切换到CDN。

One advantage you get from storing images on the disk is that you can serve them directly with a fast web server (nginx), which doesn't have to hit your code at all. Another one is that you can easier switch to a CDN later if you have to.

这篇关于将图像存储在数据库中的缺点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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