duanfuxing2417 2010-05-02 10:50
浏览 124
已采纳

在数据库mysql中保存图像

My client have created a script in php+mysql that saves images directly in the database and every images has url like this: www.example.com/image.php?id=421

In your opinion this is a very wrong solution ? Should I rebuild all the site ?

There are about 1000 visits per day and about 600 images in the database.

  • 写回答

5条回答 默认 最新

  • dongshangan2074 2010-05-02 11:11
    关注

    Images files are files, unless there is compelling reason to store them in the database, the place they belong is the file system, where you get benefits like easy backup and replication, distributed across multiple machines, directly served by the webserver, and all the last-modified-date and etag supported by the webserver to achieve better performance, etc.

    if the number of images is expected to grow, and different sizes of one image are expected to be created (e.g. thumbnail images etc.) in the coming release, a plan to migrate images from db to file system is strongly suggested.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥15 matlab实现基于主成分变换的图像融合。
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊