9 Differences between MySQL storage engine MyISAM and InnoDB _ MySQL

Source: Internet
Author: User
This article mainly introduces the nine differences between MySQL storage engine MyISAM and InnoDB, if you need it, you can refer to the following: Although the storage engine in MySQL is not only MyISAM and InnoDB, it is commonly used. Some webmasters may not pay attention to the MySQL Storage Engine. In fact, the storage engine is also an important point in database design. which storage engine should the blog system use? Next we will look at the differences between the two storage engines.

Differences between MySQL storage engine MyISAM and InnoDB

1. InnoDB supports transactions, but MyISAM does not. this is very important. A transaction is an advanced processing method. for example, you can roll back and restore any errors during column addition, deletion, and modification, but MyISAM cannot.

2. MyISAM is suitable for query and insert-based applications. InnoDB is suitable for applications with frequent modification and high security design.

III. InnoDB supports foreign keys, not MyISAM

4. MyISAM is the default engine and InnoDB needs to specify

5. InnoDB does not support FULLTEXT indexes.

6. InnoDB does not store the number of rows in the table. for example, when select count (*) from table, InnoDB needs to scan the entire table to calculate the number of rows, however, MyISAM simply needs to read the number of lines saved. Note that when the count (*) statement contains the where condition, MyISAM also needs to scan the entire table.

7. for a self-increasing field, InnoDB must contain only the index of this field. However, you can create a joint index with other fields in the MyISAM table.

8. when clearing the entire table, InnoDB deletes a row and a row, which is very slow. MyISAM will recreate the table

9. InnoDB supports row locks (in some cases, the whole table is locked, for example, update table set a = 1 where user like '% lee %'

We recommend that you use MyISAM in your blog system based on the above nine-point difference and the characteristics of your blog, because the main operation in the blog is reading and writing, and there are few chain operations. Therefore, selecting the MyISAM engine to enable your blog to open the page is more efficient than that of the InnoDB engine. of course, this is just my personal suggestion. most blogs are carefully selected based on actual conditions. My website currently uses the MyISAM engine!

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.