Answer the question
In order to leave comments, you need to log in
Is it possible to somehow disable and enable indexes in MySql 5.7 in InnoDB for large data inserts?
What are the ways to disable and enable indexes, including full text ones in MySql 5.7 - InnoDB ?
If the option below in InnoDB - does not work.
The inserts will be relatively massive, so I don't want the indexes to be recalculated each time.
Please do not scold me, I'm from MySQL to "you".
Thank you. ALTER TABLE officials DISABLE KEYS;
Answer the question
In order to leave comments, you need to log in
You can't with InnoDB, but you can with MyISAM.
1. Make sure you have a batch insert and not one at a time.
For example
But not
INSERT INTO my_table (a,b,c) VALUE(1,2,3);
INSERT INTO my_table (a,b,c) VALUE(4,5,6);
INSERT INTO my_table (a,b,c) VALUE(7,8,9);
ALTER TABLE db.my_table DISABLE KEYS;
// Вставка больших данных
ALTER TABLE db.my_table ENABLE KEYS;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question