Re: Uploading Files Should I use MySQL or Server for storage?

From: Date: Mon, 21 May 2007 03:43:04 +0000
Subject: Re: Uploading Files Should I use MySQL or Server for storage?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-255267@lists.php.net to get a copy of this message
On Sun, 2007-05-20 at 20:35 -0500, Greg Donald wrote: > On 5/20/07, benc11@gmail.com <benc11@gmail.com> wrote: > > I am in the process of adding a part to my website which would include > > pictures, pdf files, txt files, and excel files. The files sizes > > could be anywhere on average of 100k to 2mb. Do you think I should be > > uploading the files to a MySQL database or to my server? > > > http://www.zend.com/zend/trick/tricks-sept-2001.php?id=342 > > [snip] > cuts performance by approximately a third > [/snip] Sure, if you use database file storage in the naive way described in the document. But I'm quite certain a database stored binary file dispensed to multiple servers that keep a locally cached copy for subsequent requests beats NFS retrieval hands down. Sure, you could do the same caching with the NFS file but then the solution is quite likely just as good as the database storage solution. So the 1/3 performance penalty is for the naive solution. Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------'

« previous php.general (#255267) next »