List:General Discussion« Previous MessageNext Message »
From:  Date:September 25 2008 10:45pm
Subject:Re: Help!
View as plain text  
Hello

I would not recommend delete massive numbers of records in a single sql statement. I have
had problems doing this on a system with few records (1.7 million) and doing a delete
with a condition clause of "where 1 = 1".  The server had problems with this. 

The MySQL server is probably building some rollback code in case something goes wrong. If
it succeeds it will be a good amount of time. I would recommend doing several small
deletes.

Andrew



---- Grant Peel <gpeel@stripped> wrote: 
> Hi all,
> 
> I have a table I needed to prune because it had grown to 5 million rows and
> it appeared that that app that uses it couldnt anymore.
> 
> I am in the process of:
> 
> DELETE FROM mytable WHERE id < 3000000;
> 
> the above has been running for close than an hour and I am starting to get a
> little nervous.
> 
> it is on freebsd 6.3, mysql 4.x on a Single core dell 2.8 GHx I think.
> 
> I have shut down all process but necessary one so mysql has full access to
> the cpu.
> 
> Should I be worried? Is there anything I can do to speed this up?
> 
> -G
> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
> 

Thread
Help!Grant Peel26 Sep
  • Re: Help!andrewmchorney26 Sep
    • RE: Help!Martin Gainty26 Sep
      • Re: Help!Ananda Kumar26 Sep