[EMAIL PROTECTED] wrote on 17/06/2004 15:35:36:

> 
> I am curious about this, too. However, I don't think that you answer the
> original question.
> 
> Are BLOBs stored as separate files, one file per object? Are they 
combined
> into a single large BLOB file? are they aggregated into several medium
> sized files? Answering  "where are they stored on the disk" may be a 
better
> response as the docs state that they are not stored in the MyISAM table
> itself but as "separate objects" (which means what, exactly?)

This is not how I read the section of the manual. Normally, a database row 
is a single "Object" within the MyISAM file, whcih contains many 
"Objects". Successive numeric fields will be stored in adjacent words of 
the MyISAM file in exactly the order you see them when you do a "SELECT 
*". If you want to access this record, then only one disk seek is needed 
to fetch it. However, because large BLOBs are rarely involved in searches, 
rather than creating a single huge record with the BLOB embedded in it, 
the BLOB is stored elsewhere *in the same .myd file*, with only a pointer 
to the position of the blob within the file.

The upside of this is that for searches not involving the BLOB field, and 
after the indexes have been exausted, only the relatively small non-BLOB 
needs to be read and checked. The downside is that if the search involves 
the BLOB field, or if the BLOB field needsw to be fetched, then a second 
disk access is required, reducing performance.

That is how I understand it: if anybody knows better, feel free to correct 
me - one learns by ones mistakes.

        Alec

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to