From: bowen Date: October 11 2006 1:33am Subject: Re: Why does mysql drop index very very slow in a large table? List-Archive: http://lists.mysql.com/mysql/202516 Message-Id: <625ccb870610101833l3e6a4128y94e260921c6daf59@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > > 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; >