Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Tim Watts Newsgroups: comp.databases.mysql Subject: Re: Can MySql database store images? Followup-To: comp.databases.mysql Date: Sun, 24 Apr 2011 14:45:41 +0100 Organization: A noiseless patient Spider Lines: 39 Message-ID: <55md88-7pb.ln1@squidward.dionic.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit Injection-Info: mx03.eternal-september.org; posting-host="6oIlEBqCjOm0MjsSUEk5CA"; logging-data="13858"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/vPLv9j1/LUphIL/3OLRJ8lh1UNQsdzO4=" User-Agent: KNode/4.4.6 Cancel-Lock: sha1:2jDcTzcRsYoCgR+6WQgFfJw/ECE= Xref: x330-a1.tempe.blueboxinc.net comp.databases.mysql:603 Jerry Stuckle wrote: > Also, file systems don't do well with thousands of users and hundreds of > thousands of images - they just weren't made to handle that many > individual files. RDBs such as MySQL, OTOH, easily handles millions of > users and hundreds of millions of images. > > Remember- a file system is just a non-relational database. It's good > for some things but not everything. That rather depends on the filesystem. XFS will happily handle 13TB with over 10 million files - that is from personal experience. Obviously VFAT would be a bad idea, and putting *all* the files on one directory *may* be a bad idea (depends on directory hashing support in the FS) - but with a sensible layout (one dir per user, possibly with a further sublayer of user's first letters a-z) it will be fine. Couple of points IMO - and I cannot speak for MySQL in particular - but what will it do for backups? With a small database and a big filesystem of images, the DB dump will be fine and the FS can be backed up with an rsync type methodology. With a huge number of images in a DB, I suspect the possibilities of doing incremental backups are vastly reduced and your DB dump file is ging to be huge. Just my opinion, based on Postgresql - but the principles mostly apply to MySQL unless it has some particular features to help with the problems I posed. Cheers, Tim -- Tim Watts