From: Martijn Tonies Date: February 11 2010 5:27pm Subject: Re: how things get messed up List-Archive: http://lists.mysql.com/mysql/220666 Message-Id: <01c401caab3f$7d6ceba0$6101a8c0@martijnws> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit >> I think store files in DB has no complicated reasons, just for >>convenience. For example, I might make files automatically be >>backup-ed, and no budget for an independent backup solution. Thanks. >> Cui >> > [JS] Storing BLOBs in a table must slow down the inner workings of the > database engine. After all, the tables are really disk files under the > covers. > Can the database engine read only parts of a file record? > > Jerry Schwartz Well, there's where things go wrong -- first of all, a "database engine" can do -anything- it likes with the actual data. For example, the Firebird DBMS stores (longer) Blob data not right there in the record, so whenever you don't request the blob (that is, not selecting it), it ignores it completely and it can go through the file quickly. If BLOB data makes the DBMS slowish by default, it's an implementation issue that needs to be fixed. Conceptually, there's much to say -for- storing binary data in database tables, see the post by Joerg for example. With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird! Database questions? Check the forum: http://www.databasedevelopmentforum.com