List:General Discussion« Previous MessageNext Message »
From:bowen Date:October 11 2006 3:33am
Subject:Re: Why does mysql drop index very very slow in a large table?
View as plain text  
>
> 1) create table T1 like T;
> This creates an empty table T1 with indexes ndx1,ndx2,ndx3 and ndx4.
> 2) alter table T1 drop index ndx3;
> This drops index ndx3 on the empty T1, which should be instantaneous.
> 3) insert into T1 select * from T;
> This will populate table T and load all three(3) indexes for T1 in one pass.
>
Insert millions of rows into table  should be very slow, and obviously
be not efficient. Can I use `cp -f T.MYD T1.MYD` instead ?

> 4) drop table table T;
> 5) alter table T1 rename to T;
>
Thread
Why does mysql drop index very very slow in a large table?bowen10 Oct
  • RE: Why does mysql drop index very very slow in a large table?Chris \(GE Infra, Non-GE, US\) Wagner10 Oct
    • Re: Why does mysql drop index very very slow in a large table?Rolando Edwards10 Oct
      • Re: Why does mysql drop index very very slow in a large table?bowen11 Oct
        • Re: Why does mysql drop index very very slow in a large table?Rolando Edwards11 Oct