MySQL Forums
Forum List  »  Newbie

Re: checking status of CREATE INDEX
Posted by: Rick James
Date: August 19, 2010 09:20AM

No. It probably goes slower and slower as it progresses. MyISAM or InnoDB?
SHOW VARIABLES LIKE '%buffer%';
SHOW VARIABLES LIKE 'max%';
Some things can be tuned to make it run faster.

What is happening... Adding an index involves reading the entire dataset and rebuilding all the existing indexes, plus the new one. An index can be built either by
* Saving stuff to a temp file, using unix sort, then converting to the internal format. This is faster for large tables
* Using the key_buffer for randomly inserting each index entry as you go. This is faster if the total size of the indexes is less than key_buffer_size.

MySQL all too often decides to use the key_buffer when it would be better to do it the other way.

Options: ReplyQuote


Subject
Written By
Posted
Re: checking status of CREATE INDEX
August 19, 2010 09:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.