Re: Is it best practice to lock table for every Mysql query?
Posted by:
nate liv
Date: January 04, 2019 06:09AM
MySQL uses pretty much the same table-locking method for both READ and WRITE locks:
If there are no locks on the table, put a read/write lock on it.
Otherwise, put the lock request in the read/write lock queue.
When a lock is released, the lock is first made available to other processes in the write lock queue, then to the threads in the read lock queue. So if you have many updates for a table, SELECT statements will wait until there are no more updates.
Subject
Written By
Posted
December 20, 2018 11:24AM
December 21, 2018 11:13AM
December 21, 2018 11:56AM
December 21, 2018 01:08PM
December 21, 2018 01:41PM
December 21, 2018 01:58PM
December 21, 2018 03:03PM
December 21, 2018 06:46PM
December 27, 2018 09:55AM
December 27, 2018 11:01PM
Re: Is it best practice to lock table for every Mysql query?
January 04, 2019 06:09AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.