Mysql LOCK on table's fix - Printable Version
+- 24x7 Technical Support Forums (http://www.24x7servermanagement.net)
+-- Forum: Linux Server Management (http://www.24x7servermanagement.net/Forum-Linux-Server-Management)
+--- Forum: Plesk (http://www.24x7servermanagement.net/Forum-Plesk)
+--- Thread: Mysql LOCK on table's fix (/Thread-Mysql-LOCK-on-table-s-fix)
Mysql LOCK on table's fix - Mandeep - 12-11-2016
" Lock on the tables " in MySQL could cause a serious performance issue.
For example we will discuss a case here:
One of the client executes a SELECT command on the table and the query runs for a long hour.
Meanwhile another client executes an update command on the same table.
Now what happens is that in MySQL, the UPDATE query has a higher priory than SELECT statement.
This causes SELECT query to pause until UPDATE is finished.
There is a simple harmless fix to this issue.
Mysql provides a way to change the priority of the sequence in which the queries should execute.
1. edit my.cnf file using your favorite editor.
2. Add parameter low_priority_updates=1
3. save my.cnf
4. restart mysql service
You will no longer face table locking issue and notice a great improvement in mysql performance.
Hope this article helps !!