Given that OP is talking about a single delete statement, I'm gonna be very
surprised if he manages to squeeze an intermediate commit in there :-)
For a single-statement delete on a single table, the indexes will be rebuilt
only once. I'm not entirely sure what happens to cascaded deletes, though.
On Thu, Mar 18, 2010 at 6:05 AM, Ananda Kumar <anandkl@stripped> wrote:
> 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.
> On Thu, Mar 18, 2010 at 1:21 AM, Price, Randall <Randall.Price@stripped
> > Hello,
> > I have a simple question about deleting records from INNODB tables. I
> > a master table with a few child tables linked via Foreign Key
> > 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
> > 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
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel