Skip to main content
100%

SQL to upload the two big MOT data files to a MySQL database, requires the tables to by using the MyIASM engine.

✓ Published0🌍 Public
IIanHopkinson
Last edited Jul 15, 2013
Created on Jul 15, 2013

This example demonstrates a SQL script that loads two large MOT test data files into a MySQL database. It first disables keys on the `testitem` and `testresult` tables, then uses `LOAD DATA LOCAL INFILE` to bulk-import tab-delimited text files, and finally re-enables keys to speed up the insertion. The code relies on MySQL’s `ALTER TABLE ... DISABLE KEYS` and `ENABLE KEYS` directives to optimize index maintenance for the MyISAM storage engine. The data source consists of two plain-text files, `UAT_test_item_2011.txt` and `UAT_test_result_2011.txt`, with fields separated by pipes, and the path is specified by the user.

AI-generated description

Similar vizzes