Skip navigation links

MySQL Forums :: Transactions :: Problem: A SELECT ... FOR UPDATE statement locking all rows in a table


Advanced Search

Re: Problem: A SELECT ... FOR UPDATE statement locking all rows in a table
Posted by: Rick James ()
Date: July 15, 2011 10:32PM

I suspect the concept of "gap" locking is causing some of the issue.

SHOW ENGINE INNODB STATUS \G

Let's see SHOW CREATE TABLE for each table.

How long does the first transaction take?

Will you be modifying anything? If so, shouldn't you do SELECT ... FOR UPDATE?

Consider putting the three SELECTs into a single one (using JOIN).

Options: ReplyQuote


Subject Views Written By Posted
Problem: A SELECT ... FOR UPDATE statement locking all rows in a table 2815 Miloš Rašić 07/13/2011 10:17AM
Re: Problem: A SELECT ... FOR UPDATE statement locking all rows in a table 1558 Rick James 07/15/2011 10:32PM
Re: Problem: A SELECT ... FOR UPDATE statement locking all rows in a table 975 Miloš Rašić 07/20/2011 04:00AM
Re: Problem: A SELECT ... FOR UPDATE statement locking all rows in a table 843 Rick James 07/20/2011 06:22PM
Re: Problem: A SELECT ... FOR UPDATE statement locking all rows in a table 1247 Jasper Scott 07/26/2011 01:44AM


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.