MySQL Forums
Forum List  »  MyISAM

Re: max_data_length trouble with dynamic vs fixed row_format
Posted by: Jay Pipes
Date: June 27, 2005 09:48PM

The reason you're getting 4X as big max_data_length for the first table is because MyISAM must store the full character length of all your CHAR fields, even if they only contain '0' or NULL.

In the dynamic format, MyISAM can "pack" more records into a smaller space because if a value of a length less than the max length of the CHAR field is inserted, space is not wasted in the .MYD file. For each record, a certain amount of space is allocated as padding, so that table fragmentation is reduced, but not nearly as much space is used for the second table as the first.

You don't want to use ROW_FORMAT=FIXED for this table definition. You're just going to be wasting space with columns like CHAR(255) NULL. You can actually increase the number of rows in the second table definition to ~4.2 Billion if you want, which should push you well up there as far as max_data_length. Just be aware, however, that the operating system may have it's own restrictions on file size that supercede MyISAM.

Jay Pipes
Community Relations Manager, North America, MySQL Inc.

Got Cluster? http://www.mysql.com/cluster
Personal: http://jpipes.com

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: max_data_length trouble with dynamic vs fixed row_format
3525
June 27, 2005 09:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.