Type = MyISAM and engine = MyISAM

Source: Internet
Author: User
Tags types of tables

Type = MyISAM and engine = MyISAM are statements used to set the database storage engine.
(In earlier versions, MySQL uses type instead of engine (for example, type = MyISAM ).
MySQL 5.1 supports this syntax for backward compatibility, but type is currently ignored, and engine is the first usage.
Generally, the engine option is unnecessary. Unless the default value has been changed, MyISAM is the default storage engine.

 

Type = MyISAM after the create statement

This option is only available in MySQL 3.23 and later versions. As the default value.

Different table types are:
Isam original table Processor
MyISAM new binary portable table Processor
Heap data for this table is only stored in memory

No type = MyISAM statement is available, because the MyISAM type is used by default after version 3.23 !!


The MySQL table structure is exported, and the SQL is followed by a type = MyISAM auto_increment = 1068

Type = MyISAM Table type: MyISAM
Auto_increment = 1068 auto-increment fields start from 1068.


MySQL is used.  3.23.6) You can choose between the three basic database table formats. When creating a table, you can tell MySQL which table type it should use for the table. MySQL will always create a. frm file to save the table and column definitions. Indexes and data are stored in other files, depending on the table type.    
    
  You can use alter  Table statements are transformed between different types of tables. See 7.8  Alter  Table syntax.    
    
  MyISAM    
  In MySQL  In 3.23, MyISAM is the default table type. It is based on the isam code and has many useful extensions. Indexes are stored in a file with the. myi (myindex) Extension and data is stored in a file with the. MYD (mydata) extension. You can use the myisamchk utility to check/repair the MyISAM table. See 13.4  Use myisamchk for crash recovery. The following items are brand new in MyISAM:    
  You do not need to delete rows. You can Insert a new row in the table while reading data from the table by other threads.    
  Support for large files (63-bit) on the file system/operating system that supports large files ).    
  All data is first stored in low bytes, which makes the data independent from machines and OS, the only requirement is that the machine uses the complement 2 signed integer (like each machine in the last 20 years) and the IEEE floating point format (also fully dominant on mainstream machines ). The only field of machines that do not support binary compatibility is embedded systems (because they sometimes have weird processors ).    
  All numeric keys first store high bytes for higher index compression.    
  Internal processing of the auto_increment column. MyISAM will automatically update it during insert/update.  The auto_increment value can be reset with myisamchk, which makes the auto_increment column faster and the original number is not used as the old isam. Note that when an auto_increment is defined at the end of a multi-part-key, the old-fashioned behavior still exists.    
  Blob and text columns can be indexed.    
  The column to be indexed can have a null value. Each key occupies 0-1 bytes.    
  The maximum key length is 500 bytes by default. When the key size is greater than 250 bytes, a keyword block size greater than the default 1024 bytes is used for this key.    
  The maximum number of keys for each table is increased to 32 by default. This can be amplified to 64 without re-compiling myisamchk.    
  There is a file marked MyISAM that shows whether the table is properly closed. This will soon be used for automatic repairs on the MySQL server.    
  Now myisamchk will mark the table as "checked ". Myisamchk  -- Fast only checks tables without this mark.    
  Myisamchk  -A stores the statistics of key-value components (not just for isam-specific keys ).    
  Now, when deleting and updating and inserting a mixture, the row with dynamic size has fewer fragments, which is automatically merged to delete adjacent blocks. If the next block is deleted, it is done by expanding the block.    
  Myisampack can compress blob and varchar columns.    
  MyISAM also supports the following things that MySQL will be able to use in the near future.    
    
  Supports a real varchar type. A varchar column starts with the length of 2 bytes.    
  Tables with varchar can be fixed or dynamic record lengths.    
  Varchar and char can contain a maximum of 64 KB. All keyword snippets have their own language definitions, which makes each column of MySQL have different language definitions.    
  A clustered index can be used for unique; this allows you to have the unique attribute on any column combination in a table. (However, you cannot search for a unique index .)    
  You can also use the abandoned isam table type. This will soon disappear because MyISAM is a better implementation of the same thing. Isam uses a B-tree index, which is stored in. files with the ISM extension and the data is stored in. in the ISD extension file, you can use the isamchk utility to check/repair the isam table. See 13.4  Use myisamchk to restore the crash. The isam table is not portable across OS/platform binary. Isam has the following features/attributes:    
    
  Compressed and fixed-length key    
  Fixed and dynamic record length    
  There are 16 keys, each of which consists of 16 keys    
  Maximum key length 256 (default)    
  Data is stored in machine format; fast but dependent on machine/OS  . 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.