MySQL Forums
Forum List  »  MyISAM

Re: table lock for deleting and inserting
Posted by: Rick James
Date: October 22, 2009 08:02PM

Why do you need to lock the table? InnoDB will keep the two processes from messing each other; it will "do the right thing". It does so via complex row and gap locking on the primary key -- you don't have to worry about it.

Please show the INSERT and DELETE statements, plus SHOW CREATE TABLE.

If you are deleting "old" records, it would make more sense to do it at the end of the hourly insert script. A big DELETE of a week's worth of old stuff will potentially interfere with other operations. (I don't mean cause corruption; I mean slow down access.)

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: table lock for deleting and inserting
2876
October 22, 2009 08:02PM


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.