I have 2.8 billion records in a table. The table uses INFOBRIGHT engine run on mysql installation. I have a few incorrect entries in the table and would like to get them corrected.
Table Test has 350 odd columns. I had like to swap data from column P1 to column P3 for a few records (not all). The approach that I had planned to carry to migrate data is as follows
- Extract data from table Test to a CSV file using the INTO OUTFILE functionality of mysql
- Delete the unwanted records from the table.
- Import the CSV data using the LOAD DATA INFILE and use the SET clause to move the data from P1 to P3 (empty string for P1 and SET P1=P3)
The approach seemed to make sense, until I realized that INFOBRIGHT does not support the SET clause as mentioned here
Excerpts from the link below
The SET construct is supported by the MySQL loader found in the standard MySQL download but not by the Infobright loader included in ICE. I was able to actually execute a load using the SET statement; what’s interesting is that it will run but the SET gets ignored by Infobright.
Question
- Is there a easier way to do this?
- Of course, I can edit the CSV file. But for 2.8 billion records, I would like to have a sure shot way of doing it. Any tested scripts appreciated.
- I would not want to use the mysql loader and load data in to MYISAM table, because of the sheer size of data involved. Any faster approaches there?