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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2007-05-20 at 23:11 -0500, Larry Garfield wrote:
> A well-optimized and load balanced database-based setup will beat a badly 
> configured file system setup, sure.  But will it beat a well-optimized and 
> load balanced file system setup?  I would be very surprised.
> 
> Really, it comes down to this, assuming you know what you're doing either way.  
> Using a database and PHP access script will add overhead to the process.  
> Period.  There's extra script execution time, database connection time, 
> database read time, and pass-through time.  Plus memory overhead on all of 
> those, and coding/debugging time and effort.  What you get in return is more 
> places to programmatically control and log things; access-controls for 
> whether or not a user is authorized to see a file, potentially more detailed 
> access logs than you can get from simple apache logs, etc.  
> 
> Sometimes that trade-off will be worth it for whatever it is you're doing.  
> Most of the time, it probably won't be.  Decide based on what it is you're 
> doing.

Yep, I never said database was necessarily superior, only that anyone
with any skill whatsoever isn't going to be hammered by a 1/3
performance penalty for using the database. As you said... it all
depends on what you're doing. As for all the penalties you mentioned
above, you may be incurring these anyways if you have any kind of
logical control of the files since you probably have to hit the database
for file access permissions, or meta information, etc, etc.

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.          |
`------------------------------------------------------------'

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux