Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to compare InnoDB engine with MyISAM engine

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

In this issue, the editor will bring you a comparison between InnoDB engine and MyISAM engine. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

MyISAM supports full-text indexing, which is a participle-based index that supports some complex queries, but is not transaction-safe and does not support foreign keys. Each MyISAM table exists in three files: the frm file holds the table definition; the data file is MYD (MYData); and the index file is MYI (MYIndex). For MyISAM tables, you can check or repair them manually or by yourself, which should be distinguished from the transaction recovery of InnoDB.

InnoDB is a transactional engine that supports rollback, crash recovery, multi-version concurrency control (MVCC), supports ACID transactions, and supports row-level locking (row locks for InnoDB tables are not absolute, and the INnoDB table will also lock the entire table if indexes are not used to execute a SQL statement).

How InnoDB works: it fishes data into memory and is read and written by users, which greatly increases performance, because reading and writing from memory is much faster than disk.

The main differences between MyISAM and InnoDB are as follows:

1) MyISAM is non-transaction secure, while InnoDB is transaction secure, that is, ACID transaction support

2) MyISAM locks are table-level locks with the least lock overhead, while InnoDB supports row-level locking, high lock management overhead and better concurrent write operations.

3) MyISAM supports full-text indexing, while InnoDB does not support full-text indexing, but it is supported in the latest version 5.6

4) MyISAM is relatively simple and easy to manage, so it is better than InnoDB in efficiency. Small applications can consider using MyISAM.

5) MyISAM table is saved as a file, so using MyISAM storage in cross-platform data transfer will save a lot of trouble.

6) InnoDB tables are more secure than MyISAM tables and can switch from non-transactional tables to transactional tables without losing data.

The above is the editor for you to share how to compare the InnoDB engine and the MyISAM engine, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report