Re: Re: how to display images stored in DB

From: Date: Fri, 02 Mar 2007 02:41:29 +0000
Subject: Re: Re: how to display images stored in DB
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.general 
Request: Send a blank email to php-general+get-249702@lists.php.net to get a copy of this message
>> > To follow up with Ted, nobody said using the filesystem is bad, >> >> No, it is the most efficient way. > > Not in my environment. All db servers have RAID 10 over 8 SCSI 15K > disks. Pulling from them is always faster than a webserver pulling > from its SATA drive. That's not exactly an apples to apples comparison. > > Also, there is issue of going to the database and going to the > filesystem. Timing wise, you Please explain. > >> Add an image server (or 20) and change the HTML to point to the image >> server. > > I can't imagine Flickr doing that. > >> I believe that the only "new" thing I have to add is for newbies. >> >> I believe that for a newbie, it would be easier to use the filesystem >> rather than the DB. >> >> True, you then have to do some extra cleanup/management work for >> deleted records, so that the related images go away. >> >> But storing them in the DB invariably ends up with too many issues >> involving DB storage size and query buffer size, compounded by data >> escaping/security issues. > > Strange... I came to the opposite conclusion. Using prepared > statements eliminates data escaping issues, etc. And putting the files > in the db removes the extra cleanup/management stuff. And easier to > backup (though not efficient). Putting the files in the DB doesn't always remove extra cleanup/management stuff. Sometimes the database stores binary objects as files and sometimes they don't get deleted correctly.

« previous php.general (#249702) next »