In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about the differences between myisam and innodb in Mysql. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
(1) 5 points are different
1. Storage structure
MyISAM: each MyISAM is stored as three files on disk. The name of the first file starts with the name of the table, and the extension indicates the file type. The .frm file stores the table definition. The data file has the extension .MYD (MYD). The index file has the extension .myi (MYIndex).
InnoDB: the tables are all stored in the same data file (it may be multiple files, or separate tablespaces), and the size of the InnoDB table is only limited by the size of the operating system file, which is usually 2GB.
two。 Storage space
MyISAM: can be compressed, small storage space. Three different storage formats are supported: static tables (default, but note that there can be no spaces at the end of the data and will be removed), dynamic tables, and compressed tables.
InnoDB: more memory and storage is required, and it sets up its dedicated buffer pool in main memory for caching data and indexes.
3. Thing support
MyISAM: the emphasis is on performance. Each query is atomic and executes faster than the Innodb type, but does not provide transactional support.
InnoDB: provide transaction support, foreign keys and other advanced database functions. Transaction security (transaction-safe ACID compliant) type table with transaction (commit), rollback (rollback), and crash repair capability (crach recovery capabilities).
4. CURD operation
MyISAM: if you do a lot of select, MyISAM is a better choice. (because row-level locks are not supported), it is less efficient to lock the entire table when adding or deleting. Related is that innoDB supports row-level locks, delete and insert only need to lock the row, which is more efficient.
InnoDB: if your data does a lot of insert or update, you should use the InnoDB table for performance reasons. Delete Innodb is better in terms of performance, but when delete from table, InnoDB will not re-establish the table, but delete it row by row. If you want to empty a table with a large amount of data on innodb, you'd better use the command truncate table.
5. Foreign key
MyISAM: not supported.
InoDB: supported.
(2) improvement of two different versions of mysql
(3) the implementation of the index of the two.
Thank you for reading! This is the end of the article on "what is the difference between myisam and innodb in Mysql". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.