> -----Ursprüngliche Nachricht-----
> Von: Michael Waples [mailto:[EMAIL PROTECTED]]
> Gesendet: Samstag, 26. Januar 2002 09:54
> Betreff: Re: [PHP-DB] Pictures+MySQL+PHP
> Ck Raju wrote:
> > 
> >  that I changed my mind. Gurhan Ozen>Storing images in the 
> database is not a
> >  good idea , just store the path of Gurhan Ozen>the images 
> in the database
> >  and keep your images in your hard disk... Gurhan Ozen>
> > 
> > Since everything is on hard-disk, I personally feel, the 
> image can be stored
> > anywhere. BLOB should be easier when doing a mysqldump, or 
> when replication
> > is needed.
> > 
> > Anywhere else go in for storing images separately.
> > Raju
> I prefer storing images out of the dbserver to save on server 
> load. You
> can serve those images with a http server like thttpd, boa etc which
> will serve images quicker and with a lighter load.
> If you need replication just use rsync to move your images around.
> But if server load isn't an issue a database is as good as any place.
I did a community software where users can upload pics all over the
application. It is run on LVS cluster, so nobody can say to which of the
cluster members the pic is uploaded to. NFS, or unattended rsync/scp has
been denied by security policy, so the only way was to store the pics in the
DB (mysql).
I also did some performance measures, and, as all the pic requests had to go
thru php (for member verification), there was practically no performance
drawback; in fact, storing the pics in database was a bit quicker than
getting them through the filesystem when the number of pics went above
100,000 :-)
And now it is very easy to do full backups, and no problem with db/fs
getting out of sync.
Only one thing has given me a hard time: The first time I stored all 5
instances of an image (thumb plus 4 other resolutions) in the same db table,
but mysql choked on it when it became about 200 mb (the whole server did not
respond or respond veeery slow). I split the whole thing into 5 tables, and
now it runs like a charm.


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to