Skip to content

Instantly share code, notes, and snippets.

@IanHopkinson
Created July 15, 2013 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IanHopkinson/6000184 to your computer and use it in GitHub Desktop.
Save IanHopkinson/6000184 to your computer and use it in GitHub Desktop.
SQL to upload the two big MOT data files to a MySQL database, requires the tables to by using the MyIASM engine.
USE MOT;
ALTER TABLE testitem DISABLE KEYS;
LOAD DATA LOCAL INFILE '[yourpath \\ separated in Windows]UAT_test_item_2011.txt'
INTO TABLE testitem
FIELDS TERMINATED BY '|'
LINES TERMINATED BY '\n'
;
ALTER TABLE testitem ENABLE KEYS;
ALTER TABLE testresult DISABLE KEYS;
LOAD DATA LOCAL INFILE '[yourpath \\ separated in Windows]UAT_test_result_2011.txt'
INTO TABLE testresult
FIELDS TERMINATED BY '|'
LINES TERMINATED BY '\n'
;
ALTER TABLE testresult ENABLE KEYS;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment