Blob 还是上传?
我的磁盘空间没有问题,而且我的网络应用程序一次只会加载 30 个图像,问题是这些图像需要 3 秒的 ajax,所以它们要么是。
A. mysql 每 3 秒查询一次图像。 (每个观看者)
B. 使用上传的照片。
目前我认为上传的照片是最好的,但我不是这些事情的专业人士,所以我想要第二个意见。谢谢。
i do not have an issue with disk space and with my web app only 30 images will be loaded at once, issue is there is a 3 second ajax for these images so they are either.
A. mysql query every 3 seconds per image. (per viewer)
B. Use Uploaded Photos.
At the moment I am assuming an uploaded photo is the best but I am not the pro at these things so I wanted a second opinion. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
抱歉,你的问题不是很清楚。
如果您担心多个 MySQL 查询,那不是问题,假设您没有全天候运行多个查询。
在我的网络应用程序上,单个页面加载将查询数据库 10 到 50 次。但这对于一个好主人来说根本不算什么。
编辑:一般来说,将图像文件存储在网络服务器上比将它们作为 blob 存储在数据库中更快;它们将由为其优化的服务器传送。相反,将图像文件名存储在数据库中并以这种方式引用它们。
I'm sorry, your question is not very clear.
If you're worried about multiple MySQL queries, that is not an issue, assuming your are not running mulitple queries around the clock.
On my web apps, a single page load will query the database 10 to 50 times. But that is nothing for a good host.
Edit: generally speaking, it's faster to store the image files on the webserver, rather than storing them as blobs in the database; they will be delivered by the server which is optimized for it. Instead store the image filenames in your database and reference them that way.