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 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型
  • ¥15 求学软件的前人们指明方向🥺
  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn