MySQL Forums
Forum List  »  Newbie

Re: Does START TRANSACTION cause locks
Posted by: Rick James
Date: February 18, 2015 04:01PM

The SELECT can cause locks. The START and COMMIT delimit how long the locks are held. The SET autocommit is useless, regardless, since START begins a transaction.

If you are _only_ doing SELECTs _and_ you don't care where two SELECTs come up with inconsistent results (due to INSERTs from some other connection), then you don't need to bother with START and COMMIT. (You do need autocommit=1, which is probably what it is defaulted to.)

Options: ReplyQuote


Subject
Written By
Posted
February 14, 2015 02:34PM
Re: Does START TRANSACTION cause locks
February 18, 2015 04:01PM


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.