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.)
Subject
Views
Written By
Posted
6107
October 21, 2009 08:25AM
Re: table lock for deleting and inserting
2876
October 22, 2009 08:02PM
2685
October 23, 2009 11:19AM
2460
October 23, 2009 08:12PM
2966
October 26, 2009 10:21AM
2581
October 26, 2009 08:24PM
2434
October 26, 2009 08:51PM
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.