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

A brief understanding of MYSQL's MyISAM storage engine

2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following together to understand a simple understanding of MYSQL MyISAM storage engine, I believe we will certainly benefit a lot after reading, the text is not more refined, I hope to simply understand MYSQL MyISAM storage engine This short content is what you want.

characteristics

> Not supported transactions

Proof is as follows:

>> Table record: Engine of t2 table is myisam.

>> Operation

Note: If you are doing a transaction on the database and the transaction fails, you will have to look at your table engine to see if it supports transactions.

>> See below for transaction operations in innodb

> Storage structures: data files (.MYD), index files (.MYI), and structure files (.frm)

>> Features: Data files and index files can be copied on different Cloud Virtual Machine.

> Locking and concurrency

Locking: Locks the entire table, not the rows.

Concurrency: When reading data, all tables can obtain shared locks (read locks), and each connection does not interfere with each other.

When writing data, acquiring exclusive locks the entire table, while other connection requests (read and write requests) are pending.

> Repair table

>> View table status

>> Check the table to see if it is normal.

>> repair(repair) the following table. My watch is normal.

> Column index. You can create a correlation index based on the first 500 characters of a BLOB or TEXT type column.

>> Add a text column to the t2 table.

>> The table structure is as follows

>> Add a full-text index to the content field

>> View table indexing

> Delay updating the index. MYISAM has DELAY_KEY_WRITE turned on by default, and the entire option is unique to MYISAM engines.

Note: At the end of the query, the index changes are not written to disk, but the index data in memory is changed. Index blocks are dumped to disk only when the buffer is cleaned or the table is closed.

> Compression table

>> View data file locations

>> Compressed files

summary

Myisam makes a great contribution to the index layer and compression layer, so we often use myisam for the slave layer, which clients can read. Myisam will generate exclusive lock when writing library operation. If the write operation is occupied all the time, other connection requests will always be waiting, thus causing congestion and even dropping the Cloud Virtual Machine.

After reading this article, many readers will definitely want to know more about MyISAM storage engine. For more industry information, you can pay attention to our industry information column.

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