MySQL Forums
Forum List  »  InnoDB

Re: Lock wait timeout exceeded; try restarting transaction
Posted by: Rick James
Date: June 06, 2010 09:01AM

SHOW CREATE TABLE UAMS_User;
Sounds like you don't have the appropriate indexes.

insert into T2 select eid,ctime from UAMS_User where pid in (select eid from T1) and eid>666 and status>9
What is T1? About how many rows will be in it? Can you turn this into a JOIN? ("IN (SELECT ...)" is often _much_ slower than the equivalent JOIN.)

"ltime<date_sub( NAME_CONST('sp_datetime',..." -- Which tables are ltime and sp_datetime in? Are they indexed?

SHOW TABLE STATUS -- need to see how big the tables are.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Lock wait timeout exceeded; try restarting transaction
3233
June 06, 2010 09:01AM


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.