MySQL Forums
Forum List  »  General

Re: Is it best practice to lock table for every Mysql query?
Posted by: Peter Brawley
Date: December 21, 2018 11:13AM

> Assume we use MySQL MyIsam tables and php coding for websites in which the database are frequently read and update.

Bad start. For a multi-user context like that where read consistency is desired, you need InnoDB and all updates in transaction blocks.

> can we run the query without lock all tables for READ and in the meantime ensure the results of SELECT is right?

No. You're taking a snapshot, there are no guarantees an object in the pic isn't moving.

Options: ReplyQuote




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.