MySQL Forums
Forum List  »  MyISAM

Re: .ini settings for ADD KEY to 30Gb table on 96Gb machine?
Posted by: Rick James
Date: October 27, 2010 07:13AM

You are doing most things 'right'.

I'm not sure, but raising this significantly may solve the problem:
myisam_max_sort_file_size 16777216000
Suggest 100G, assuming you have that much disk space to spare.

Do SHOW PROCESSLIST; Does it say "Repair with keycache"? Here are some threads, none of which are conclusive enough to satisfy me:
http://forums.mysql.com/read.php?24,382967 (Create Index Slow)
http://forums.mysql.com/read.php?10,379243 (How to avoid Repair with keycache for indexing big table ?)
http://forums.mysql.com/read.php?21,375635 ("Alter table enable keys" randomly using "Repair with keycache")
http://forums.mysql.com/read.php?21,366172 (Repair Will Not Use Filesort)
http://forums.mysql.com/read.php?24,355844 (how to avoid repair by keycache)
http://forums.mysql.com/read.php?21,286031 (Slow Repair Table with Large Unique Keys)
http://forums.mysql.com/read.php?24,277763 (enable keys, force sort, not keycache)
http://forums.mysql.com/read.php?24,251134 (Speed of bulk inserts degrading over time)
http://forums.mysql.com/read.php?21,120068 (indexing speed)
http://forums.mysql.com/read.php?21,114821 (How to avoid 'Repair with keycache')
http://forums.mysql.com/read.php?21,86150 (Avoiding "Repair with keycache")

Minor comments:

Data Length 27G
Max Data Length 5910974G
implies that the myisam_data_pointer_size (6) for MyISAM indexes is at least 1 byte longer than it need to be. 1 byte = 1328408635 bytes per index = 2.5GB

The 'grinding away' will continue until the entire task (adding 2 indexes) is finished. This will still be faster than adding each index separately.

What will the SELECTs be like?

Options: ReplyQuote




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.