drop table if exists t1,t2; create table t1 ( snp_type varchar (2) not null, snp_id int not null, chr_cnt int not null, contig_cnt int not null, loc_cnt int not null, weight int not null, hap_cnt int not null, placed_cnt int not null, grouped_cnt int not null, unplaced_cnt int not null, md5 char (32) null, assembly varchar (32) null ) engine = myisam; create table t2 ( snp_type varchar (2) not null, snp_id int not null, chr_cnt int not null, contig_cnt int not null, loc_cnt int not null, weight int not null, hap_cnt int not null, placed_cnt int not null, grouped_cnt int not null, unplaced_cnt int not null, md5 char (32) null, assembly varchar (32) null, unique index iuc_rs_weight_assembly using btree (snp_id, assembly), index idxsnpid using btree (snp_id, weight), index idxmd5 using btree (md5) ) engine = memory; set @snp_id:=4; set @assembly:=4; insert into t1 values ('aa',0,1,1,1,1,1,1,1,1,md5(0),md5(0)); insert into t1 values ('aa',1,1,1,1,1,1,1,1,1,md5(1),md5(1)); insert into t1 values ('aa',2,1,1,1,1,1,1,1,1,md5(2),md5(2)); insert into t1 values ('aa',3,1,1,1,1,1,1,1,1,md5(3),md5(3)); insert into t1 select 'aa',(@snp_id:=@snp_id+1),1,1,1,1,1,1,1,1,md5(@snp_id),md5(@assembly:=@assembly+1) from t1,t1 a,t1 b,t1 c,t1 d,t1 e,t1 f,t1 g,t1 h,t1 i,t1 j,t1 k,t1 l; select * from t1 into outfile 't1.txt'; load data infile 't1.txt' into table t2; results: -------------- server started like this: D:\mysql-5.5.29-winx64\bin>mysqld.exe --no-defaults --skip-gr --skip-na --console --tmp-table-size=20G --max-heap-table-size=20G mysql> show table status; +------+--------+---------+------------+----------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+ | Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment | +------+--------+---------+------------+----------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+ | t1 | MyISAM | 10 | Dynamic | 67108868 | 111 | 7516193212 | 281474976710655 | 1024 | 0 | NULL | 2013-02-03 20:32:57 | 2013-02-03 20:35:47 | NULL | latin1_swedish_ci | NULL | | | | t2 | MEMORY | 10 | Fixed | 67108868 | 105 | 7577280864 | 3534400124 | 11744051900 | 0 | NULL | 2013-02-03 20:41:32 | NULL | NULL | latin1_swedish_ci | NULL | | | +------+--------+---------+------------+----------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+---------+ 2 rows in set (0.00 sec)