Just like to mention that http://www.blobstreaming.org was created to
solve this problem in MySQL.
The Launchpad project is here: https://launchpad.net/pbxt
On Feb 16, 2010, at 3:23 PM, Johan De Meersman wrote:
> On Mon, Feb 15, 2010 at 10:53 AM, Martijn Tonies
>> databases are made for storing data - it saves you on both database
>> and PHP
>>> requests, as (from a web point of view) you can't return the image
>>> inside your HTML - it requires a second HTTP call. Filesystem image
>> Doesn't an image always required additional http calls from the
>> <IMG> tag?
> Yes, that's what I'm saying. However, there's a significant difference
> between an HTTP call that only needs to pump a file on to the
> network, and
> an HTTP call that needs to start a PHP process that then in turn
> needs to
> connect to the DB, which then needs to parse and execute a query.
> Offloading static files (images, css, whatnot) to a separate server
> runs a lightweight, threaded httpd without PHP and whatnot compiled
> in, also
> means that you'll need less hardware to serve the same amount of
> requests -
> our PHP machines typically run 400 apache processes, but a static
> server on
> the same hardware could easily serve a few thousand threads -
> suddenly it's
> not memory/cpu but disk/network bandwidth that becomes your
>> If you do go for BLOBs, though, for god's sake keep them in a
>>> table, lest you fragment your datafiles. Split records are a
>>> disaster for
>> I agree -for MySQL-, but this is a MySQL limitation!! Not a DBMS one.
> True. I think (but am too lazy to verify) that even in MySQL this is
> an issue with MyISAM, not InnoDB. Given how MyISAM is the default
> though, I thought it worthwile to mention.
> Separate LOB storage still leaves the overhead of query parsing and
> generic DBMS stuff which isn't there on a filesystem, though, not to
> that each image requests takes up a database connection for as long
> as it
> takes to transfer the (potentially huge) data. Don't forget that in a
> well-tuned database, network transfer is often a significant part of
> total connection lifetime for select statements.
> Bier met grenadyn
> Is als mosterd by den wyn
> Sy die't drinkt, is eene kwezel
> Hy die't drinkt, is ras een ezel