The current way I am loading the file is:
load data local infile 'file_name' into table tableA
fields terminated by ',' enclosed by '"' lines terminated by '\n';
Is the optimal way to load in a table in a unix machine. Does it create the optimal table size? I want a table that takes up the smallest space.
MyISAM
If the table is MyISAM, you should do the following:
InnoDB
If the table is InnoDB, you should do the following:
No only will this take up the least space (loading an empty table), but the rows will be buffered in a treelike structure in memory based on the bulk_insert_buffer_size for caching the data quicker during the reload.
If you are worried about ibdata1 exploding, you need to convert all InnoDB tables to use innodb_file_per_table. Please use my InnoDB Cleanup Steps : Howto: Clean a mysql InnoDB storage engine?