Re: GD to database directly

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

 



On Monday 10 July 2006 09:31, Peter Lauri wrote:
> [snip]
> 1. Do not store images in a database, it is just a bad idea from a
> performance perspective (as has been covered many times heretofore).
> [/snip]
>
> Is that really the case? Is this not depending on the application? :) My
> application will never grow, and I can easily just change the file storage
> procedure by changing in my file storage class if a change will be
> necessary.
>
> /Peter

The process of loading a script that then loads a database driver and makes an 
SQL call to retrieve a bitstream and set the correct header and then print 
the bitstream is slower than the process of sending a URL to the browser 
which can then make a simple HTTP request against a static file.  Always.

There may be other reasons you'd want to store binary data in an SQL database, 
but it will always be a performance hit over just passing a normal file that 
can be streamed right off the disk to the server's NIC.

-- 
Larry Garfield			AIM: LOLG42
larry@xxxxxxxxxxxxxxxx		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

-- 
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