ISAM Tables


ISAM tables are included in MySQL purely for legacy support. Their functionality has been entirely replaced by MyISAM tables, so they will not be examined in any detail here. They are scheduled to be removed from MySQL in version 5.0.

The following code will create an ISAM table, should you want to for some reason:

 
 create table asset (   assetID int not null,   description varchar(255) ) type=ISAM; 

ISAM tables offer fast but not transaction-safe storage. Most of what we will say about MyISAM tables holds true for ISAM tables, but the older ISAM tables have several limitations.

Improvements offered by MyISAM include the following:

  • Table portability. Tables stored on disk or backup media can be loaded onto another system running MySQL, regardless of the platform. This is not true for ISAM tables.

  • Support for very large tables. ISAM tables have a hard limit of 4GB. MyISAM allows tables to be as large as the underlying operating system will allow. This will be important only to some users, and it means choosing your operating system (and file system) carefully . Many file systems limit files to being 2GB in size. (Note that we can actually get around this limitation using MERGE tables.)

  • More efficient use of disk space. Spaces and fragmentation are reduced.

  • Less restricted keys. ISAM tables allow 16 keys per table and a default maximum key length of 256 bytes. MyISAM tables allow 64 keys per table and a default maximum key length of 1024 bytes.

ISAM tables should be regarded as being deprecated. They still exist, but they should not be used for new development. If you have any existing ISAM tables, you should strongly consider converting them to MyISAM. It takes very little effort and offers significant advantages.



MySQL Tutorial
MySQL Tutorial
ISBN: 0672325845
EAN: 2147483647
Year: 2003
Pages: 261

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net