re: Storing Images in Mysql

0 views
Skip to first unread message

Sam Keen

unread,
Jun 11, 2009, 2:23:33 PM6/11/09
to pdx...@googlegroups.com
whenever I've considered it , i've always gone with plain old file system storage.

Some interesting notes on the subject
http://www.freeopenbook.com/mysqlcookbook/mysqlckbk-CHP-17-SECT-7.html




from Andrew:

> -- Have you found performance bottlenecks with keeping images, or
> other binary data, in a database vs as static content on the
> filesystem?

Mike Botsko

unread,
Jun 11, 2009, 2:32:12 PM6/11/09
to pdx...@googlegroups.com
Ditto. The only time I ever stored images in the db, I ended up wishing I hadn't. When I had to transfer the database to another server, it's was very painful.
--
Michael Botsko
Owner, Botsko.net, LLC - Programming & Web Services
Lead Developer, Trellis Development, LLC
Phone: 1-(503)-307-1468
Fax: 1-(503)-207-5484
bot...@gmail.com
aim: botskonet
www.botsko.net
www.trellisdevelopment.com

Moxley Stratton

unread,
Jun 11, 2009, 6:38:08 PM6/11/09
to pdx...@googlegroups.com
On a Rails project in 2007, we stored the images and videos in the database. The theory was that it simplified deployment and management of the application. Instead of having two different data stores-- a database and image files-- there was just a database. The first time a given image was requested, it was served up through the database and then cached on the filesystem. After that first request, Apache served it directly from the file system, using mod_rewrite to check for the cached file. Doing it is all about ease of management.

On Thu, Jun 11, 2009 at 11:23 AM, Sam Keen <sam...@gmail.com> wrote:

Chris Fortune

unread,
Jun 11, 2009, 9:24:35 PM6/11/09
to pdx...@googlegroups.com
my vote is for the file system storage. SQL storage has performance
issues and character encoding issues. Linux file system has been in
use since Jan 1 1970!!, it's very efficient. Also there are a ton of
image utilities out there that use the file system by default. The
command shell is your friend :)
Reply all
Reply to author
Forward
0 new messages