Check out example codes for "faster mysql imports". It will help you in understanding the concepts better.

Code Example 1

#To disable MySQL indexes:
ALTER TABLE `table_name` DISABLE KEYS;
#To enable MySQL indexes:
ALTER TABLE `table_name` ENABLE KEYS;

Code Example 2

#Innodb before import:
SET FOREIGN_KEY_CHECKS = 0;
SET UNIQUE_CHECKS = 0;
SET AUTOCOMMIT = 0;
#After import:
SET UNIQUE_CHECKS = 1;
SET FOREIGN_KEY_CHECKS = 1;
COMMIT;

Learn ReactJs, React Native from akashmittal.com