Re: [PHP] Re: how to display images stored in DB



> To follow up with Ted, nobody said using the filesystem is bad,

No, it is the most efficient way.

Not in my environment. All db servers have RAID 10 over 8 SCSI 15K
disks. Pulling from them is always faster than a webserver pulling
from its SATA drive.

Also, there is issue of going to the database and going to the
filesystem. Timing wise, you

Add an image server (or 20) and change the HTML to point to the image
server.

I can't imagine Flickr doing that.

I believe that the only "new" thing I have to add is for newbies.

I believe that for a newbie, it would be easier to use the filesystem
rather than the DB.

True, you then have to do some extra cleanup/management work for
deleted records, so that the related images go away.

But storing them in the DB invariably ends up with too many issues
involving DB storage size and query buffer size, compounded by data
escaping/security issues.

Strange... I came to the opposite conclusion. Using prepared
statements eliminates data escaping issues, etc. And putting the files
in the db removes the extra cleanup/management stuff. And easier to
backup (though not efficient).

Again, the problem of replication or distribution does not require a
database. If you are saying that your single database will contain all
your bitmap files, then that's messed up and your database will be a
bottleneck.

You've stated a problem: A large amount of data spread across multiple
machines, this is a real problem domain, but it absolutely does not say
why a database is the right solution or even a solution at all.

I guess you skimmed what I wrote. What I wrote was about using a
database for meta data and server and file location. I was talking
about using that date to intelligently know where the file was .... on
a file system. Mostly because it is cheaper to scale that way as you
can tune things to add more replicas for redundancy and performance.
Then that can hit scalability problems with many hundred of servers.
But easy to solve by breaking down meta data and storage parts. Have
fewer storage servers talk to a meta data (database) server such that
you can run the databases on the same cheap machines that you run the
storage stuff. Then you have a task server that manages the meta data
servers and storage servers.

Chaining things this may see like a lot of steps to go through. But it
can be very efficient throughput wise, which matters far more than a
benchmark. To anyone that has designed CPUs, this will look a little
familiar (though more flexible).

At that point you also never have a complete backup on one machine. I
remember that being a weird thing....
.



Relevant Pages

  • Re: largest php site
    ... and database server from your application server for this to work, ... The load on the database - are there many reads? ... Storage - how much data do you plan to store/collect/use per visitor? ... you would need 1.5 terrabytes of bandwidth per month. ...
    (comp.lang.php)
  • Re: Database restore - Ex2000 SP3, Backup Exec 8.6
    ... same drive c:\first storage group\ect. ... Mount the database first, check the allow this database to be over written option, dismount the store and then try the restore again. ... Exchange server is corrupt. ...
    (microsoft.public.exchange2000.admin)
  • Re: performance: store.exe uses 579Mb only out of 4Gb
    ... What's the design speed of your storage? ... looking at the size of your edb and stm files and the amount of users ... free RAM is the server hold hundreds of mailboxes? ... the database is 63Gband the accompanying stm file is ...
    (microsoft.public.exchange.admin)
  • RE: slow work of SQL server
    ... Are you using a non fiber SCSI or non iSCSI storage device? ... > Month ago we installed the did cluster for Microsoft server. ... > so sometimes the database starting to work really slow. ...
    (microsoft.public.sqlserver.clustering)
  • Create SharePoint Portal failed.
    ... One mentioned ensuring that SQL Server uses a case ... 13:55:40 Service database server is 'USDC-JOHRIV'. ... Update dbo.propertylist set DisplayName = N'Last name' ...
    (microsoft.public.sharepoint.portalserver)