List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:August 12 1999 9:02pm
Subject:Re: Drop large tables?
View as plain text  
"Sean L. Gilley" wrote:
> I got an application that occasionally (through one or more bugs)
> creates a large number of entries in a mysql table -- entries numbering
> in the millions.
> I've got a way to recreate the table with correct data from scratch,
> but the problem lays in deleting the data from the tables.  I've tried
> various things...
>         delete from table where field like '%'
>         delete from table
>         drop table (then recreating it)
> All these approaches seem to take forever when the tables get that big.
> Today I discovered something that may work, but probably isn't the best
> thing to do..  I remove all associated files from the data area for that
> table, then do mysqladmin refresh.  This seemed to work the one time I
> tried it.
> Is there something better I can do, that works quickly?
> Thanks,
> Sean.

Hi Sean

Should be the fastest way to destroy and recreate a table, as long as there aren't any
LOCKs on the table.

Moving the  files ad issue an refresh or flush tables should be save to do.


Drop large tables?Sean L. Gilley12 Aug
  • Re: Drop large tables?Christian Mack12 Aug