List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:August 5 2004 8:09pm
Subject:Re: Why drop a index takes so long to do?
View as plain text  
In the last episode (Aug 05), Jeremy Zawodny said:
> On Thu, Aug 05, 2004 at 11:27:40AM -0700, Haitao Jiang wrote:
> > I have a 3GB index which includes a fulltext index on 2 columns. I
> > wanted to drop this fulltext index from the table, but it took
> > forever. Why it is so slow? Is it because MySQL basically go
> > through the index file (there is only one) and re-write it to
> > another file and then copy it back?
> > Any other fast way to drop a index like this?
> 
> Not that I know of.
> 
> Someday each index will be in a separate file (optionally?).  Then
> it'll be quite fast to drop an index.

Even with the current setup, index changes could be sped up by simply
copying the index blocks for the rest of the indices instead of
rebuilding them.  Dropping could even be made instantaneous, resulting
in freespace in the index file that can be reused or defragmented with
OPTIMIZE TABLE.

-- 
	Dan Nelson
	dnelson@stripped
Thread
Why drop a index takes so long to do?Haitao Jiang5 Aug
  • Re: Why drop a index takes so long to do?mos5 Aug
  • Re: Why drop a index takes so long to do?Jeremy Zawodny5 Aug
    • Re: Why drop a index takes so long to do?Dan Nelson5 Aug