Re: NOLOCK for multiple tables
Posted by: Øystein Grøvlen
Date: November 18, 2015 02:30AM


AFAIK, NOLOCK clause is not supported in MySQL.

Note that what kind of locking is used will depend on the storage engine.

For isolation level READ COMMITTED, InnoDB will not acquire any locks for SELECT statements. It uses Multiversion Concurrency Control (MVCC) and will read the versions at the time when the execution of the query started. For REPEATABLE READ, so-called gap locks will be used to prevent phantoms. Gap locks will make sure that no new records will be inserted into the range that was accessed by the query.


Øystein Grøvlen,
Senior Principal Software Engineer,
MySQL Group, Oracle,
Trondheim, Norway

Options: ReplyQuote

Written By
November 17, 2015 07:30AM
November 17, 2015 12:10PM
November 18, 2015 01:41AM
Re: NOLOCK for multiple tables
November 18, 2015 02:30AM
November 26, 2015 04:51AM

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.