InnoDB and MyISAM

Source: Internet
Author: User

MyISAM: This is the default type, it is based on the traditional ISAM type, compared to other storage engines, MyISAM has most of the tools for checking and repairing tables, supports full-text search , is not transaction-safe, and does not support foreign keys , and if the rollback of a thing results in incomplete rollback and does not have atomicity, If executing a lot of select,myisam is a better choice.

InnoDB: This type is transaction-safe. It has the same characteristics as the BDB type, and they also support foreign keys. If you need a transaction-safe storage engine, it is recommended to use it. If your data performs a large number of inserts or update, for performance reasons, you should use the InnoDB table for performance reasons.

The LOAD table from master operation has no effect on InnoDB, and the workaround is to first change the InnoDB table to a MyISAM table, import the data and then change it to a InnoDB table, but not for tables that use additional InnoDB features (such as foreign keys)

Handwritten SQL CREATE TABLE:

CREATE TABLE News
(
ID int unsigned NOT NULL auto_increment,
Title varchar (+) NOT null default ' comment ' news headline ',
class_id int unsigned NOT NULL default ' 0 ' comment ' belongs to the category ID ',
Content text NOT null comment ' details ',
Primary key (ID),
Index ' I_title ' (title), index ' i_class_id ' (class_id)
) engine= ' innodb ' default charset UTF8 comment = ' news sheet ';

InnoDB and MyISAM

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.