From: Ananda Kumar Date: March 18 2010 5:05am Subject: Re: Question about DELETE List-Archive: http://lists.mysql.com/mysql/220990 Message-Id: <829b199c1003172205m6db332bmf185de877a8c89c0@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=001636e1fd3fb5ade104820c2d09 --001636e1fd3fb5ade104820c2d09 Content-Type: text/plain; charset=ISO-8859-1 Hi, It depends how frequently ur doing a commit. If you have written a plsql, with loop and if you commit after each row is deleted, then it get update for each row. Else if you commit at the end the loop, it commits only once for all the rows deleted. regards anandkl On Thu, Mar 18, 2010 at 1:21 AM, Price, Randall wrote: > Hello, > > I have a simple question about deleting records from INNODB tables. I have > a master table with a few child tables linked via Foreign Key constraints. > Each table has several indexes as well. > > My question is: if I delete many records in a single delete statement > (i.e., DELETE FROM table WHERE id = 1 AND id = 5 ... AND ID = 100) how many > times are the foreign keys/indexes updated? > > Once for the entire DELETE operation or one time for each record that is > deleted? > > Thanks, > > Randall Price > > --001636e1fd3fb5ade104820c2d09--