In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the method of setting table type by mysql, which has certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
Mysql sets the table type: you can set the table type by directly executing the [alter table data table name type = MsISAM] statement. MyISAM datasheets can be compressed and support full-text search.
Modify the sql statement of the mysql table type:
Alter table table name type = MyISAM;alter table table name type = InnoDB
MyISAM: this is the default type, which is based on the traditional ISAM type. ISAM, an abbreviation for Indexed Sequential Access Method (indexed sequential access method), is the standard way to store records and files. Compared with other storage engines, MyISAM has most of the tools for checking and repairing tables.
MyISAM tables can be compressed, and they support full-text search. They are not transactional safe and do not support foreign keys. If things are rolled back, it will result in incomplete rollback, which is not atomic. It is better to perform a large amount of SELECT,MyISAM.
InnoDB: this type is transaction safe. It has the same features as the BDB type, and they also support foreign keys. InnoDB tables are fast and have richer features than BDB, so if you need a transaction-safe storage engine, it is recommended. If your data does a lot of INSERT or UPDATE, you should use the InnoDB table for performance reasons.
For the InnoDB type label that supports things, the main reason for affecting the speed is AUTOCOMMI, the default setting is on, and the program does not explicitly call BEGIN to start the transaction, resulting in automatic Commit for each insert, seriously affecting the speed. You can call begin before executing sql, and multiple sql forms a single thing (even if the autocommit is opened), which will greatly improve performance.
Thank you for reading this article carefully. I hope it will be helpful for everyone to share the method of setting the table type in mysql. At the same time, I also hope that you will support us, pay attention to the industry information channel, and find out if you have any problems. Detailed solutions are waiting for you to learn!
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.