Mysql ENABLE KEYS Commands Take Time

I have a MyISAM database table. I am inserting about 360,000 records here using the DISABLE KEYS before and DISABLE KEYS commands after the data is inserted. After entering data into the table, the ENABLE KEYS commands continue, but on a high-performance server it takes more than 17 hours (it currently works and is 17 hours ..). Where could the problem be?

The table has a lot of indexes, and it worked great a few weeks ago. Is this a problem with the configuration of the MySQL server?

+4
source share
1 answer

What does your SHOW PROCESSLIST say regarding the state your ALTER TABLE table ENABLE KEYS ?

Have you changed the configuration of MySQL to handle the generation of indexes on large tables?

You may have passed the data size threshold in which MySQL changes its methods to build the MyISAM index.

A good blog post to understand / fix / facilitate what is happening:

http://venublog.com/2010/01/04/performance-comparison-of-repair-by-sorting-or-by-keycache/

0
source

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


All Articles