Mike Fifield wrote:
> After posting my question about performance earlier this morning it was
> suggested that I also store the jpg's in the database, (thanks Maxim). I did
> a little research and got a lot of conflicting information on weather this
> is a good idea or not. For example the following url states that you suffer
> a 30% performance hit by doing it this way. 
> http://www.zend.com/zend/trick/tricks-sept-2001.php
> <http://www.zend.com/zend/trick/tricks-sept-2001.php> 
> Is anyone out there running a website that stores images as binary data in
> MySql that could comment on this?
> Any and all comments are welcome. 
> Mike

*Storing* images in the database is only half the battle - you need to 
have another script to pull them out and display them.

The only situation where this makes sense is if you want/need to 
programmatically control access to images.  Just like you can control 
access to various other bits of data in the database, you can also 
control access to specific image data in a database - but it's an extra 
step to pull it out.  An extra HTTP request, I should say.

If you don't have a need to programmatically control access to image 
files, don't bother putting them in a database.  Let the filesystem do 
what it's meant to do - serve files.

Michael Kimsal
Guaranteed PHP support when you need it

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to