> I have an update operation where I am able to update 10 million records in approx
> 2.5 mins.
>
> But when I tried to do the same update on say 40-50 million records, mysql
> takes forever to finish. Its the same table, and same update operation, i am
> just changing the range of ids using where clause.
>
> Why might this be happening, and how to solve this?
Sounds like you're either killing the disk or cpu. Have you tuned the
filesystem using something like hdparm?
vmstat/top will tell you what's going on here.
> Also, when a query takes too long I kill it by shutting down the server, is
> this safe or is there a better alternative (MyISAM tables)?
As someone else mentioned open a new mysql connection and do
show processlist;
kill <id>;
though I'm not sure what will happen when it's doing an update :/