(Mariadb/mysql) MyISAM Storage Engine priority for read and write operations

Source: Internet
Author: User

Storage engines that use table-level locks in mariadb/mysql (such as MyISAM, Aria (MariaDB improvements to MyISAM engine, formerly MyISAM)) are read (select), write operations (INSERT, delete, UPDATE, Replace) has a priority concept. By default, write operations take precedence over read operations. Note: does not apply to the InnoDB storage engine.

Take MyISAM as an example. When there is a process is writing MyISAM table, and there is a new read operation, write operations appear, will perform all the write operations, and so on before reading the table. In fact, all writes are not always performed first, because the system variable max_write_lock_count controls the maximum number of write locks, and when the number of writes is completed, it is converted to a read operation.

Therefore, the INSERT, LOAD DATA INFILE, UPDATE, REPLACE, DELETE statements all have the low_priority keyword to reduce the write operation priority for the MyISAM storage engine. Allows MARIADB to perform all read operations before performing a write operation. The SELECT statement has the high_priority keyword, which is used to increase the priority of the read operation. In addition to these two keywords, you can also set the system variable low_priority_updates=on to lower the write operation priority.

The only thing to note is that the INSERT statement is not only low_priority, but also high_priority. When you use the insert High_priority statement, the concurrent Insert behavior that disables insert is disabled.

Back to Linux series article outline: http://www.cnblogs.com/f-ck-need-u/p/7048359.html
Back to Site Architecture series article outline: http://www.cnblogs.com/f-ck-need-u/p/7576137.html
Back to Database series article outline: http://www.cnblogs.com/f-ck-need-u/p/7586194.html
Reprint Please specify source: http://www.cnblogs.com/f-ck-need-u/p/8907252.html

Note: If you think this article is not bad please click on the lower right corner of the recommendation, your support can inspire the author more enthusiasm for writing, thank you very much!

(mariadb/mysql) MyISAM storage engine priority for read, write operations

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.