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--
When we create the database, some small projects will not pay much attention to the database engine, and some large projects will consider the problem of the database engine, which will directly affect the later use.
MyISAM:MyISAM is MySQL's ISAM extension format and default database engine. In addition to providing a large number of indexing and field management features that are not available in ISAM, MyISAM also uses a table locking mechanism to optimize multiple concurrent read and write operations at the cost of running OPTIMIZE TABLE commands frequently to recover the space wasted by the update mechanism. MyISAM also has some useful extensions, such as the MyISAMCHK tool to repair database files and the MyISAMPACK tool to recover wasted space. MYISAM emphasizes fast read operations, which is probably the main reason why MySQL is so popular with WEB developers: a lot of the data operations you do in WEB development are read operations. Therefore, most web hosting providers and INTERNET platform providers are only allowed to use the MYISAM format. An important drawback of the MyISAM format is that it cannot recover data after the table is corrupted.
The InnoDB:InnoDB database engine is a direct product of the technology that makes MySQL flexible, which is MYSQL+API. Almost every challenge you face when using MYSQL stems from the fact that the ISAM and MyISAM database engines do not support transaction processing (transaction process) or foreign keys. Although much slower than the ISAM and MyISAM engines, InnoDB includes support for transactions and foreign keys that the first two engines do not have. As mentioned earlier, if your design requires one or both of these features, you will be forced to use one of the last two engines.
MEMORY: MEMORY is a special storage engine in MySQL. It uses the contents stored in memory to create the table, and the data is all in memory. These features are very different from the previous two. Each table based on the MEMORY storage engine actually corresponds to a disk file. The file name of the file is the same as the table name, and the type is frm. Only the structure of the table is stored in this file. The data files are stored in memory, which is conducive to the rapid processing of data and improve the efficiency of the whole table. It is worth noting that the server needs to have enough memory to maintain the use of the tables of the MEMORY storage engine. If you don't need it, you can free up memory or even delete unwanted tables. MEMORY uses a hash index by default. It is faster than using a B-tree index. Of course, if you want to use a B-tree index, you can specify it when you create the index. Note that MEMORY is rarely used because it stores data in memory, and if an exception occurs in memory, it will affect the data. If you restart or shut down, all data will disappear. Therefore, MEMORY-based tables have a short life cycle and are generally one-time.
Choose the appropriate database engine according to your actual situation.
The article is from http://www.huthon.com.
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.