Hi! On Nov 22, Robert Citek wrote: > > Hello Sergei, > > In going through the archives I found this message which is similar to an > issue I am currently having. You mention to "Consult the manual for > details." I've check through the on-line manual: > http://www.mysql.com/doc/en/index.html > specifically, > http://www.mysql.com/doc/en/SHOW_VARIABLES.html > > Unfortunately, this section does not provide an in-depth explanation of the > variables, their settings, suggestions for values, min/max/range, etc. > For example, you mention that myisam_max_sort_file_size should be 'big > enough for MySQL to use "repair by sort" method'. Can you recommend any > guidelines for setting this value? Or pointers to a place in the manual > where I can find an explanation or set of guidlines? Currently, I have set > myisam_max_sort_file_size to 3,145,728,000 (megabytes? since I'm using > 3.23) and myisam_sort_buffer_size to 268,435,456. Yet, my database is > still using the "repair with keycache" when I add an index with "alter > table ..."
Here's the relevant part from the code (myisam/mi_check.c, mi_too_big_key_for_sort()): rows * key->maxlength > myisam_max_temp_length || rows * (key->maxlength - key->minlength) / 2 > myisam_max_extra_temp_length in CREATE TABLE a ( t VARCHAR(254) NOT NULL, i INT NOT NULL, KEY k1 (t), KEY k2 (i)); k1->minlength=1, k1->maxlength=255 k2->minlength=k2->maxlength=4; (I don't remember exact values, but they should be close to what I said) Regards, Sergei -- MySQL Development Team __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany <___/ --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php