Skip to content

Instantly share code, notes, and snippets.

@kolinko-ant
Forked from Veve2/fastload.sql
Created June 3, 2019 13:37
Show Gist options
  • Save kolinko-ant/10b222eb78579c09acc60a38881bce3f to your computer and use it in GitHub Desktop.
Save kolinko-ant/10b222eb78579c09acc60a38881bce3f to your computer and use it in GitHub Desktop.
Fast LOAD DATA INFILE with MySQL
SET FOREIGN_KEY_CHECKS = 0;
SET UNIQUE_CHECKS = 0;
SET SESSION tx_isolation='READ-UNCOMMITTED';
SET sql_log_bin = 0;
#LOAD DATA LOCAL INFILE....
SET UNIQUE_CHECKS = 1;
SET FOREIGN_KEY_CHECKS = 1;
SET SESSION tx_isolation='READ-REPEATABLE';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment