Ruby on rails plugin: Import With Load Data In File
Wednesday, October 8th, 2008This plugin lets you bulk insert records into a MySql table using the “LOAD DATA IN FILE” feature of MySql.
This is about 30% faster than using a standard bulk insert (eg: ar-extensions import)
all it does is:
– take a list of columns and a 2D Array with the column values
– create a tempfile and put a csv representation of the data in it
– call mysql’s LOAD DATA INFILE against the temp file
Example:
