Determine index status in mysql

I created a new index on a table with 35 million records, and it has been working for almost 1 day. Previously, when I created indexes, it took 20 minutes, however the columns were float. New idnex is on varchar (45)

I used the processlist command, which shows that index creation is still done with the next output

65417 | Repair with keycache | CREATE INDEX insert_index on checkins(dateinserted)

I was wondering if anyone could give me advice on figuring out if the request is really dead and just sitting in the process list. Perhaps at some point something went wrong, and I don’t know.

thank

+3
source share
2 answers

Your index is building, but very slowly.

MySQL has two methods for creating indexes:

  • . , .
  • keycache. , , - .

keycache : . , , INSERT .

quicksort, . , .

, , . . Myisam_max_sort_file_size

http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_myisam_max_sort_file_size

Linux , , . , MySQL:

sudo ls -l /proc/[mysql-pid]/fd  

- .

+6

, 35M * 45. utf8, 35M * 45 * 3. 4 ! , .

?

, , 8 ? , 8.

+2

Source: https://habr.com/ru/post/1767765/


All Articles