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