32 messages in com.mysql.lists.mysqlRe: BLOB's - General Guidance
FromSent OnAttachments
David Blomstrom19 May 2004 13:18 
Greg Willits19 May 2004 14:00 
David Blomstrom19 May 2004 14:06 
jabb...@abbotts.org19 May 2004 14:19 
Michael Kruckenberg19 May 2004 14:30 
David Blomstrom19 May 2004 15:11 
Greg Willits19 May 2004 15:18 
Greg Willits19 May 2004 15:29 
Hassan Schroeder19 May 2004 15:49 
David Blomstrom19 May 2004 16:21 
artem19 May 2004 16:34 
Hassan Schroeder19 May 2004 16:37 
Udik...@aol.com20 May 2004 14:45 
Greg Willits20 May 2004 14:57 
Luis R. Rodriguez20 May 2004 17:47 
David Blomstrom20 May 2004 18:55 
jabb...@abbotts.org20 May 2004 19:24 
David Blomstrom20 May 2004 20:17 
SGr...@unimin.com21 May 2004 08:31 
Udik...@aol.com21 May 2004 11:25 
David Blomstrom21 May 2004 15:32 
Udik...@aol.com21 May 2004 17:01 
Erich Beyrent21 May 2004 18:52 
David Blomstrom21 May 2004 19:16 
Hassan Schroeder21 May 2004 20:01 
David Blomstrom21 May 2004 21:14 
David Blomstrom21 May 2004 21:47 
Hassan Schroeder21 May 2004 21:47 
Greg Willits21 May 2004 21:55 
Luis R. Rodriguez22 May 2004 23:19 
Joshua J. Kugler27 May 2004 01:25 
Robert J Taylor27 May 2004 02:02 
Subject:Re: BLOB's - General Guidance
From:SGr...@unimin.com (SGr@unimin.com)
Date:05/21/2004 08:31:19 AM
List:com.mysql.lists.mysql

I think we all have missed the opportunity to discuss horizontal scaling when it comes to links vs. blobs. If you store links in the data then you gain the ability to use edge caches, secondary file servers, web farms, file farms, network storage and all of those other high-capacity file services available for cheap vs. needing to buy new hardware and support a second MySQL server just to serve up image files.

IMHO it's more flexible to your application to store links in the database and let the files themselves come from systems organized around file services. It's possible to do so, and practical under certain conditions, to store files as data but you start running into the "economics of scale" once you go into "production". Consider this, you get better throughput from the database when it is both handling queries and pumping out the file contents? I suggest you let your other file-specific systems take care of the file/media/image traffic for you and leave your DB server to just handling queries.

Shawn Green Database Administrator Unimin Corporation - Spruce Pine

David Blomstrom <david_blomstrom@ To: mys@lists.mysql.com yahoo.com> cc: Fax to: 05/20/2004 09:55 Subject: Re: BLOB's - General
Guidance PM

Udik@aol.com wrote:

Another perspective on the subject of BLOB vs. Links.

Links are easier to implement and may be an OK way

to start. However, a file system is really a crude database, and I emphasize "crude". It's not very good at handling high transaction rates, access from multiple machines, or volume.

If your application grows quickly and before you

know it you have hundreds of folders with thousands of files in each - your file system will slow to a crawl. All the performance, security, and consistancy features developers have worked so hard to put into database engines don't or barely exist in file systems.

So - if you go the link approach - you'll be fine

for a while, but when you see the directory structure starting to buckle - it might be time to give BLOBs another look.

I'm confused. It sounds like you're basicallly saying that databases slow down as they grow bigger. That's logical.

But then you suggest that, when a database begins to get too big, BLOBs may be better than storing links.

I don't understand that. How can storing images as BLOBs be more efficient that creating a field that simply stores links to those images? Or am I missing something?