Home > Database > Mysql Tutorial > body text

High-performance MySQL-Introduction to the basic differences between storage engines MyISAM and InnoDB

黄舟
Release: 2017-03-15 17:19:25
Original
1626 people have browsed it


This blog post mainly summarizes the differences between MyISAM and InnoDB

InnoDB and MyISAM are the two most commonly used table types when using MySQL , both table types have their own advantages and disadvantages, depending on the specific application. The basic differences are:

(1) The MyISAM type does not support advanced processing such as transaction processing, while the InnoDB type supports transactions.

(2) InnoDB supports data row locking; MyISAM does not support row locking and only supports locking the entire table. It should be noted here that the row lock of the InnoDB table is not absolute. If MySQL cannot determine the range to be scanned when executing a SQL statement, the InnoDB table will also lock the entire table, for example, update table set num=1 where name like “% aaa%”

(3) InnoDB supports foreign keys, but MyISAM does not.

(4) InnoDB does not save the specific number of rows in the table. That is to say, when executing select count() from table, InnoDB has to scan the entire table to calculate how many rows there are. But MyISAM simply reads the number of saved rows. Note that when the count() statement contains where conditions, the operations of the two tables are the same.

The above is the detailed content of High-performance MySQL-Introduction to the basic differences between storage engines MyISAM and InnoDB. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!