MySQL indexes are automatically disabled - why?

I noticed that some requests were executed rather slowly suddenly. After running EXPLAIN on them, I realized that they do not use the indexes that I created.

I looked further using SHOW INDEXES and realized that everyone was disabled except for the primary key in the table. I am sure that I have not disabled indexes manually.

I manually enabled indexes again using the ALTER TABLE ENABLE KEYS table, and everything returns to normal.

How would they become disabled in the first place? Under what circumstances are indexes automatically disabled?

+4
source share
1 answer

I am sure that the dump files contain instructions for temporarily disabling indexes to speed up insertion. If someone restored the data from the dump, and the recovery failed, the indexes would remain disabled.

+6
source

All Articles