I'm currently building a huge scale of database with many transactions there. (Insert, Update, Select) with MySQL MyISAM
And I'm considering to use LOCK TABLE AND UNLOCK TABLE for the sensitive tables. What will happen if :
User A has an update process (Lock the table first) and while still in process, User B and User C trying to access the same table and row (whether it's update/select).
This table is really sensitive, and it will messed up if I can't prevent this
Thanks for your answer
Do not use MyISAM storage engine if you want to scale more efficiently and deal with concurrency problems. The main reason to choose InnoDB instead of MyISAM is that MyISAM use per table locks (which will become the bottleneck of your performance), while InnoDB implements MVCC (multiversion concurrency control) which means locking at row level.
Also MyISAM does not support transactions and needs manual repair in case of table curruption.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With