MySQL Storage engine MyISAM innodb differences

Source: Internet
Author: User

Although the storage engine in MySQL is not just the MyISAM and the InnoDB two, it is often the two of them. There may be a webmaster did not pay attention to the MySQL storage engine, in fact, the storage engine is a major point in database design, then the blog system should use which storage engine? Let's look at the differences between the two storage engines, respectively.

The difference between MySQL storage engine MyISAM and InnoDB

First,innodb support affairs, MyISAM not support , this is very important. Transactions are an advanced way of handling, such as in some column additions and deletions, as long as the error can be rolled back to restore, and MyISAM will not be.

Second,MyISAM suitable for query and insert -based applications,InnoDB suitable for frequent modification and design to high security applications

Third, INNODB support foreign key, MyISAM not support

Four, MyISAM is the default engine, InnoDB need to specify

V. INNODB does not support indexes of fulltext types

Six, InnoDB does not save the number of rows in the table, such as SELECT COUNT (*) from table, InnoDB needs to scan through the entire table to calculate how many rows, but MyISAM simply read out the number of rows saved. Note that when the COUNT (*) statement contains a where condition, MyISAM also needs to scan the entire table

Vii. for self-growing fields, InnoDB must contain only the index of the field, but you can establish a federated index with other fields in the MyISAM table

Eight, when emptying the entire table, InnoDB is a row of deletes, the efficiency is very slow. MyISAM will rebuild the table.

Ix. InnoDB supports row locks (or, in some cases, lock whole tables, such as Update table set a=1 where user like '%lee% '

MySQL Storage engine MyISAM innodb differences

Related Article

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.