MySQL Update – How to Update a Huge Table from a Text File

importMySQLupdate

I have a huge MySQL table with 1.3 TB data with InnoDB engine format.

Now I have a text file containing updated values of 2.2 GB of records in the 1.3 TB of data.

How do I proceed ?

I am a newbie to this data loading part. Please guide me through this.

Here the sample data present in the .txt file.

91653   8       2       1       4       Publisher                               2       1       4
91653   8       2       2       5       Publisher                               3b      1       5

Best Answer

since you are using TSV file you can use the following command to import the data:

LOAD DATA INFILE 'data.tsv' INTO TABLE database_name.my_table;

references: http://dev.mysql.com/doc/refman/5.1/en/load-data.html

http://forums.devshed.com/mysql-help-4/importing-tab-separated-file-tsv-table-853669.html

http://dev.mysql.com/doc/refman/5.1/en/loading-tables.html