MySQL Forums
Forum List  »  MyISAM

Re: How to identify which connection has locked a particular table
Posted by: Rick James
Date: November 22, 2011 09:31AM

There is no direct way. But there is a pretty simple indirect way. Look at the "Time" in PROCESSLIST. Ignore any that are "Sleep". Find the connection(s) that are not "Locked", but have been running longer (according to Time) than any running connection(s).

Usually that algorithm leads to the obvious villain. Sometimes it can lead to more than one.

Caveat about Slaves: The Time in the SQL thread is deceptive. It may be the villain, or it may be a red herring. The Time is "how long ago this query started on the _Master_", hence it is a pretty good indicator of replication lag.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to identify which connection has locked a particular table
1951
November 22, 2011 09:31AM


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.