From: Martijn Tonies Date: February 12 2010 7:05am Subject: Re: how things get messed up List-Archive: http://lists.mysql.com/mysql/220673 Message-Id: <00ab01caabb1$c1159a60$6101a8c0@martijnws> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit >>> [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. >> > [JS] That's an interesting idea that hadn't occurred to me. Essentially, > it's > creating a dependent table behind your back. > Jerry Schwartz Firebird uses 1 or multiple files per database, not per table, this file has a special "blob area", so to speak, and the records include a "blob ID". When a client/stored routine selects a blob that isn't available in the record data (stored "in between"), it then goes to the area where blobs are stored and gets it from there. Works quite well. As I said, a DBMS can do anything it likes with it's data as long as it returns it correctly. I'm surprised there are DBMSses that don't do this, Firebird comes from InterBase comes from Groton Database Systems which was the first with BLOBs and they had the idea right, so it seems ;-) Enjoy the read: http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_blob_history 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