List:General Discussion« Previous MessageNext Message »
From:Homam S.A. Date:January 28 2005 7:27pm
Subject:Why MySQL is very slow in dropping indexes?
View as plain text  
Dropping an index on a MyISAM table should be
instantaneous. It should only take as long as deleting
the idx file from the file system. But it's taking
almost as long as creating the index itself!

Here's my queries and time they took:

/*[10:58:17 AM][367172 ms]*/ alter table MyTable add
index (MyIndex)

/*[11:20:21 AM][183891 ms]*/ alter table MyTable drop
index MyIndex

In MS SQL server, if the index isn't clustered and
there are no other indexes in the table, dropping the
index is instantaneous.

This extreme slowness in dropping a simple index in
MySQL defeats the whole strategy of dropping indexes
on some tables before a huge insert operation.

Why doesn't it just delete the index file and clear
whatever cached buffers it has of it?



		
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 
Thread
Why MySQL is very slow in dropping indexes?Homam S.A.28 Jan
  • Re: Why MySQL is very slow in dropping indexes?SGreen28 Jan
  • Re: Why MySQL is very slow in dropping indexes?Keith Ivey28 Jan
  • Re: Why MySQL is very slow in dropping indexes?Sasha Pachev28 Jan
  • Re: Why MySQL is very slow in dropping indexes?Martijn Tonies28 Jan
Re: Why MySQL is very slow in dropping indexes?Heikki Tuuri30 Jan